| File: | home/alan/workspace/canalyze/test/python/scipy/build/src.linux-x86_64-3.8/build/src.linux-x86_64-3.8/scipy/linalg/_fblasmodule.c |
| Warning: | line 27460, column 44 PyObject ownership leak with reference count of 1 |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
| 1 | /* File: _fblasmodule.c | |||
| 2 | * This file is auto-generated with f2py (version:2). | |||
| 3 | * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, | |||
| 4 | * written by Pearu Peterson <pearu@cens.ioc.ee>. | |||
| 5 | * Generation date: Wed Jul 14 03:02:03 2021 | |||
| 6 | * Do not edit this file directly unless you know what you are doing!!! | |||
| 7 | */ | |||
| 8 | ||||
| 9 | #ifdef __cplusplus | |||
| 10 | extern "C" { | |||
| 11 | #endif | |||
| 12 | ||||
| 13 | /*********************** See f2py2e/cfuncs.py: includes ***********************/ | |||
| 14 | #include <stdarg.h> | |||
| 15 | #include "Python.h" | |||
| 16 | #include "fortranobject.h" | |||
| 17 | #include <math.h> | |||
| 18 | ||||
| 19 | /**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/ | |||
| 20 | static PyObject *_fblas_error; | |||
| 21 | static PyObject *_fblas_module; | |||
| 22 | ||||
| 23 | /*********************** See f2py2e/cfuncs.py: typedefs ***********************/ | |||
| 24 | typedef struct {double r,i;} complex_double; | |||
| 25 | typedef struct {float r,i;} complex_float; | |||
| 26 | ||||
| 27 | /****************** See f2py2e/cfuncs.py: typedefs_generated ******************/ | |||
| 28 | /*need_typedefs_generated*/ | |||
| 29 | ||||
| 30 | /********************** See f2py2e/cfuncs.py: cppmacros **********************/ | |||
| 31 | #if defined(PREPEND_FORTRAN) | |||
| 32 | #if defined(NO_APPEND_FORTRAN) | |||
| 33 | #if defined(UPPERCASE_FORTRAN) | |||
| 34 | #define F_FUNC(f,F)f_ _##F | |||
| 35 | #else | |||
| 36 | #define F_FUNC(f,F)f_ _##f | |||
| 37 | #endif | |||
| 38 | #else | |||
| 39 | #if defined(UPPERCASE_FORTRAN) | |||
| 40 | #define F_FUNC(f,F)f_ _##F##_ | |||
| 41 | #else | |||
| 42 | #define F_FUNC(f,F)f_ _##f##_ | |||
| 43 | #endif | |||
| 44 | #endif | |||
| 45 | #else | |||
| 46 | #if defined(NO_APPEND_FORTRAN) | |||
| 47 | #if defined(UPPERCASE_FORTRAN) | |||
| 48 | #define F_FUNC(f,F)f_ F | |||
| 49 | #else | |||
| 50 | #define F_FUNC(f,F)f_ f | |||
| 51 | #endif | |||
| 52 | #else | |||
| 53 | #if defined(UPPERCASE_FORTRAN) | |||
| 54 | #define F_FUNC(f,F)f_ F##_ | |||
| 55 | #else | |||
| 56 | #define F_FUNC(f,F)f_ f##_ | |||
| 57 | #endif | |||
| 58 | #endif | |||
| 59 | #endif | |||
| 60 | #if defined(UNDERSCORE_G77) | |||
| 61 | #define F_FUNC_US(f,F)f_ F_FUNC(f##_,F##_)f##__ | |||
| 62 | #else | |||
| 63 | #define F_FUNC_US(f,F)f_ F_FUNC(f,F)f_ | |||
| 64 | #endif | |||
| 65 | ||||
| 66 | #ifdef DEBUGCFUNCS | |||
| 67 | #define CFUNCSMESS(mess) fprintf(stderr,"debug-capi:"mess)__fprintf_chk (stderr, 2 - 1, "debug-capi:"mess); | |||
| 68 | #define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \ | |||
| 69 | PyObject_Print((PyObject *)obj,stderrstderr,Py_PRINT_RAW1);\ | |||
| 70 | fprintf(stderr,"\n")__fprintf_chk (stderr, 2 - 1, "\n"); | |||
| 71 | #else | |||
| 72 | #define CFUNCSMESS(mess) | |||
| 73 | #define CFUNCSMESSPY(mess,obj) | |||
| 74 | #endif | |||
| 75 | ||||
| 76 | #ifndef max | |||
| 77 | #define max(a,b)((a > b) ? (a) : (b)) ((a > b) ? (a) : (b)) | |||
| 78 | #endif | |||
| 79 | #ifndef min | |||
| 80 | #define min(a,b)((a < b) ? (a) : (b)) ((a < b) ? (a) : (b)) | |||
| 81 | #endif | |||
| 82 | #ifndef MAX | |||
| 83 | #define MAX(a,b)((a > b) ? (a) : (b)) ((a > b) ? (a) : (b)) | |||
| 84 | #endif | |||
| 85 | #ifndef MIN | |||
| 86 | #define MIN(a,b)((a < b) ? (a) : (b)) ((a < b) ? (a) : (b)) | |||
| 87 | #endif | |||
| 88 | ||||
| 89 | #define pyobj_from_complex_float1(v)(PyComplex_FromDoubles(v.r,v.i)) (PyComplex_FromDoubles(v.r,v.i)) | |||
| 90 | #define pyobj_from_complex_double1(v)(PyComplex_FromDoubles(v.r,v.i)) (PyComplex_FromDoubles(v.r,v.i)) | |||
| 91 | #define rank(var)var_Rank var ## _Rank | |||
| 92 | #define shape(var,dim)var_Dims[dim] var ## _Dims[dim] | |||
| 93 | #define old_rank(var)((((PyArrayObject_fields *)((PyArrayObject *)(capi_var_tmp))) ->nd)) (PyArray_NDIM((PyArrayObject *)(capi_ ## var ## _tmp))(((PyArrayObject_fields *)((PyArrayObject *)(capi_ ## var ## _tmp )))->nd)) | |||
| 94 | #define old_shape(var,dim)((((PyArrayObject_fields *)(((PyArrayObject *)(capi_var_tmp)) ))->dimensions)[dim]) PyArray_DIM(((PyArrayObject *)(capi_ ## var ## _tmp)),dim)((((PyArrayObject_fields *)(((PyArrayObject *)(capi_ ## var ## _tmp))))->dimensions)[dim]) | |||
| 95 | #define fshape(var,dim)var_Dims[var_Rank-dim-1] shape(var,rank(var)-dim-1)var_Dims[var_Rank-dim-1] | |||
| 96 | #define len(var)var_Dims[0] shape(var,0)var_Dims[0] | |||
| 97 | #define flen(var)var_Dims[var_Rank-0 -1] fshape(var,0)var_Dims[var_Rank-0 -1] | |||
| 98 | #define old_size(var)(*(npy_intp (*)(npy_intp const *, int)) _npy_f2py_ARRAY_API[158 ])((((PyArrayObject_fields *)((PyArrayObject *)(capi_var_tmp) ))->dimensions), (((PyArrayObject_fields *)((PyArrayObject *)(capi_var_tmp)))->nd)) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))(*(npy_intp (*)(npy_intp const *, int)) _npy_f2py_ARRAY_API[158 ])((((PyArrayObject_fields *)((PyArrayObject *)(capi_ ## var ## _tmp)))->dimensions), (((PyArrayObject_fields *)((PyArrayObject *)(capi_ ## var ## _tmp)))->nd)) | |||
| 99 | /* #define index(i) capi_i ## i */ | |||
| 100 | #define slen(var)capi_var_len capi_ ## var ## _len | |||
| 101 | #define size(var, ...)f2py_size((PyArrayObject *)(capi_var_tmp), ..., -1) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1) | |||
| 102 | ||||
| 103 | #define CHECKSCALAR(check,tcheck,name,show,var)if (!(check)) { char errstring[256]; __builtin___sprintf_chk ( errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1) , "%s: "show, "("tcheck") failed for "name, var); PyErr_SetString (_fblas_error,errstring); } else\ | |||
| 104 | if (!(check)) {\ | |||
| 105 | char errstring[256];\ | |||
| 106 | sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var)__builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: "show, "("tcheck") failed for "name , var);\ | |||
| 107 | PyErr_SetString(_fblas_error,errstring);\ | |||
| 108 | /*goto capi_fail;*/\ | |||
| 109 | } else | |||
| 110 | #if defined(PREPEND_FORTRAN) | |||
| 111 | #if defined(NO_APPEND_FORTRAN) | |||
| 112 | #if defined(UPPERCASE_FORTRAN) | |||
| 113 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ _F2PYWRAP##F | |||
| 114 | #else | |||
| 115 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ _f2pywrap##f | |||
| 116 | #endif | |||
| 117 | #else | |||
| 118 | #if defined(UPPERCASE_FORTRAN) | |||
| 119 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ _F2PYWRAP##F##_ | |||
| 120 | #else | |||
| 121 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ _f2pywrap##f##_ | |||
| 122 | #endif | |||
| 123 | #endif | |||
| 124 | #else | |||
| 125 | #if defined(NO_APPEND_FORTRAN) | |||
| 126 | #if defined(UPPERCASE_FORTRAN) | |||
| 127 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ F2PYWRAP##F | |||
| 128 | #else | |||
| 129 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ f2pywrap##f | |||
| 130 | #endif | |||
| 131 | #else | |||
| 132 | #if defined(UPPERCASE_FORTRAN) | |||
| 133 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ F2PYWRAP##F##_ | |||
| 134 | #else | |||
| 135 | #define F_WRAPPEDFUNC(f,F)f2pywrapf_ f2pywrap##f##_ | |||
| 136 | #endif | |||
| 137 | #endif | |||
| 138 | #endif | |||
| 139 | #if defined(UNDERSCORE_G77) | |||
| 140 | #define F_WRAPPEDFUNC_US(f,F)f2pywrapf_ F_WRAPPEDFUNC(f##_,F##_)f2pywrapf##__ | |||
| 141 | #else | |||
| 142 | #define F_WRAPPEDFUNC_US(f,F)f2pywrapf_ F_WRAPPEDFUNC(f,F)f2pywrapf_ | |||
| 143 | #endif | |||
| 144 | ||||
| 145 | #define CHECKARRAY(check,tcheck,name)if (!(check)) { PyErr_SetString(_fblas_error,"("tcheck") failed for " name); } else \ | |||
| 146 | if (!(check)) {\ | |||
| 147 | PyErr_SetString(_fblas_error,"("tcheck") failed for "name);\ | |||
| 148 | /*goto capi_fail;*/\ | |||
| 149 | } else | |||
| 150 | ||||
| 151 | /************************ See f2py2e/cfuncs.py: cfuncs ************************/ | |||
| 152 | static int f2py_size(PyArrayObject* var, ...) | |||
| 153 | { | |||
| 154 | npy_int sz = 0; | |||
| 155 | npy_int dim; | |||
| 156 | npy_int rank; | |||
| 157 | va_list argp; | |||
| 158 | va_start(argp, var)__builtin_va_start(argp, var); | |||
| 159 | dim = va_arg(argp, npy_int)__builtin_va_arg(argp, npy_int); | |||
| 160 | if (dim==-1) | |||
| 161 | { | |||
| 162 | sz = PyArray_SIZE(var)(*(npy_intp (*)(npy_intp const *, int)) _npy_f2py_ARRAY_API[158 ])((((PyArrayObject_fields *)(var))->dimensions), (((PyArrayObject_fields *)(var))->nd)); | |||
| 163 | } | |||
| 164 | else | |||
| 165 | { | |||
| 166 | rank = PyArray_NDIM(var)(((PyArrayObject_fields *)(var))->nd); | |||
| 167 | if (dim>=1 && dim<=rank) | |||
| 168 | sz = PyArray_DIM(var, dim-1)((((PyArrayObject_fields *)(var))->dimensions)[dim-1]); | |||
| 169 | else | |||
| 170 | fprintf(stderr, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n", dim, rank)__fprintf_chk (stderr, 2 - 1, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n" , dim, rank); | |||
| 171 | } | |||
| 172 | va_end(argp)__builtin_va_end(argp); | |||
| 173 | return sz; | |||
| 174 | } | |||
| 175 | ||||
| 176 | static int complex_double_from_pyobj(complex_double* v,PyObject *obj,const char *errmess) { | |||
| 177 | Py_complex c; | |||
| 178 | if (PyComplex_Check(obj)((((PyObject*)(obj))->ob_type) == (&PyComplex_Type) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (&PyComplex_Type )))) { | |||
| 179 | c=PyComplex_AsCComplex(obj); | |||
| 180 | (*v).r=c.real, (*v).i=c.imag; | |||
| 181 | return 1; | |||
| 182 | } | |||
| 183 | if (PyArray_IsScalar(obj, ComplexFloating)(((((PyObject*)(obj))->ob_type) == (&(*(PyTypeObject * )_npy_f2py_ARRAY_API[17])) || PyType_IsSubtype((((PyObject*)( obj))->ob_type), (&(*(PyTypeObject *)_npy_f2py_ARRAY_API [17])))))) { | |||
| 184 | if (PyArray_IsScalar(obj, CFloat)(((((PyObject*)(obj))->ob_type) == (&(*(PyTypeObject * )_npy_f2py_ARRAY_API[33])) || PyType_IsSubtype((((PyObject*)( obj))->ob_type), (&(*(PyTypeObject *)_npy_f2py_ARRAY_API [33])))))) { | |||
| 185 | npy_cfloat new; | |||
| 186 | PyArray_ScalarAsCtype(*(void (*)(PyObject *, void *)) _npy_f2py_ARRAY_API[62])(obj, &new); | |||
| 187 | (*v).r = (double)new.real; | |||
| 188 | (*v).i = (double)new.imag; | |||
| 189 | } | |||
| 190 | else if (PyArray_IsScalar(obj, CLongDouble)(((((PyObject*)(obj))->ob_type) == (&(*(PyTypeObject * )_npy_f2py_ARRAY_API[35])) || PyType_IsSubtype((((PyObject*)( obj))->ob_type), (&(*(PyTypeObject *)_npy_f2py_ARRAY_API [35])))))) { | |||
| 191 | npy_clongdouble new; | |||
| 192 | PyArray_ScalarAsCtype(*(void (*)(PyObject *, void *)) _npy_f2py_ARRAY_API[62])(obj, &new); | |||
| 193 | (*v).r = (double)new.real; | |||
| 194 | (*v).i = (double)new.imag; | |||
| 195 | } | |||
| 196 | else { /* if (PyArray_IsScalar(obj, CDouble)) */ | |||
| 197 | PyArray_ScalarAsCtype(*(void (*)(PyObject *, void *)) _npy_f2py_ARRAY_API[62])(obj, v); | |||
| 198 | } | |||
| 199 | return 1; | |||
| 200 | } | |||
| 201 | if (PyArray_CheckScalar(obj)((((((PyObject*)(obj))->ob_type) == (&(*(PyTypeObject * )_npy_f2py_ARRAY_API[10])) || PyType_IsSubtype((((PyObject*)( obj))->ob_type), (&(*(PyTypeObject *)_npy_f2py_ARRAY_API [10]))))) || (((((PyObject*)(obj))->ob_type) == (&(*(PyTypeObject *)_npy_f2py_ARRAY_API[2])) || PyType_IsSubtype((((PyObject*) (obj))->ob_type), (&(*(PyTypeObject *)_npy_f2py_ARRAY_API [2])))) && ((((PyArrayObject_fields *)((PyArrayObject *)obj))->nd) == 0)))) { /* 0-dim array or still array scalar */ | |||
| 202 | PyObject *arr; | |||
| 203 | if (PyArray_Check(obj)((((PyObject*)(obj))->ob_type) == (&(*(PyTypeObject *) _npy_f2py_ARRAY_API[2])) || PyType_IsSubtype((((PyObject*)(obj ))->ob_type), (&(*(PyTypeObject *)_npy_f2py_ARRAY_API[ 2]))))) { | |||
| 204 | arr = PyArray_Cast((PyArrayObject *)obj, NPY_CDOUBLE)(*(PyObject * (*)(PyArrayObject *, PyArray_Descr *, int)) _npy_f2py_ARRAY_API [49])((PyArrayObject *)obj, (*(PyArray_Descr * (*)(int)) _npy_f2py_ARRAY_API [45])(NPY_CDOUBLE), 0); | |||
| 205 | } | |||
| 206 | else { | |||
| 207 | arr = PyArray_FromScalar(*(PyObject * (*)(PyObject *, PyArray_Descr *)) _npy_f2py_ARRAY_API [61])(obj, PyArray_DescrFromType(*(PyArray_Descr * (*)(int)) _npy_f2py_ARRAY_API[45])(NPY_CDOUBLE)); | |||
| 208 | } | |||
| 209 | if (arr==NULL((void*)0)) return 0; | |||
| 210 | (*v).r = ((npy_cdouble *)PyArray_DATA(arr)((void *)((PyArrayObject_fields *)(arr))->data))->real; | |||
| 211 | (*v).i = ((npy_cdouble *)PyArray_DATA(arr)((void *)((PyArrayObject_fields *)(arr))->data))->imag; | |||
| 212 | return 1; | |||
| 213 | } | |||
| 214 | /* Python does not provide PyNumber_Complex function :-( */ | |||
| 215 | (*v).i=0.0; | |||
| 216 | if (PyFloat_Check(obj)((((PyObject*)(obj))->ob_type) == (&PyFloat_Type) || PyType_IsSubtype ((((PyObject*)(obj))->ob_type), (&PyFloat_Type)))) { | |||
| 217 | #ifdef __sgi | |||
| 218 | (*v).r = PyFloat_AsDouble(obj); | |||
| 219 | #else | |||
| 220 | (*v).r = PyFloat_AS_DOUBLE(obj)(((PyFloatObject *)(obj))->ob_fval); | |||
| 221 | #endif | |||
| 222 | return 1; | |||
| 223 | } | |||
| 224 | if (PyInt_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 24))) != 0)) { | |||
| 225 | (*v).r = (double)PyInt_AS_LONGPyLong_AsLong(obj); | |||
| 226 | return 1; | |||
| 227 | } | |||
| 228 | if (PyLong_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 24))) != 0)) { | |||
| 229 | (*v).r = PyLong_AsDouble(obj); | |||
| 230 | return (!PyErr_Occurred()); | |||
| 231 | } | |||
| 232 | if (PySequence_Check(obj) && !(PyString_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 27))) != 0) || PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 28))) != 0))) { | |||
| 233 | PyObject *tmp = PySequence_GetItem(obj,0); | |||
| 234 | if (tmp) { | |||
| 235 | if (complex_double_from_pyobj(v,tmp,errmess)) { | |||
| 236 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 237 | return 1; | |||
| 238 | } | |||
| 239 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 240 | } | |||
| 241 | } | |||
| 242 | { | |||
| 243 | PyObject* err = PyErr_Occurred(); | |||
| 244 | if (err==NULL((void*)0)) | |||
| 245 | err = PyExc_TypeError; | |||
| 246 | PyErr_SetString(err,errmess); | |||
| 247 | } | |||
| 248 | return 0; | |||
| 249 | } | |||
| 250 | ||||
| 251 | static int double_from_pyobj(double* v,PyObject *obj,const char *errmess) { | |||
| 252 | PyObject* tmp = NULL((void*)0); | |||
| 253 | if (PyFloat_Check(obj)((((PyObject*)(obj))->ob_type) == (&PyFloat_Type) || PyType_IsSubtype ((((PyObject*)(obj))->ob_type), (&PyFloat_Type)))) { | |||
| 254 | #ifdef __sgi | |||
| 255 | *v = PyFloat_AsDouble(obj); | |||
| 256 | #else | |||
| 257 | *v = PyFloat_AS_DOUBLE(obj)(((PyFloatObject *)(obj))->ob_fval); | |||
| 258 | #endif | |||
| 259 | return 1; | |||
| 260 | } | |||
| 261 | tmp = PyNumber_Float(obj); | |||
| 262 | if (tmp) { | |||
| 263 | #ifdef __sgi | |||
| 264 | *v = PyFloat_AsDouble(tmp); | |||
| 265 | #else | |||
| 266 | *v = PyFloat_AS_DOUBLE(tmp)(((PyFloatObject *)(tmp))->ob_fval); | |||
| 267 | #endif | |||
| 268 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 269 | return 1; | |||
| 270 | } | |||
| 271 | if (PyComplex_Check(obj)((((PyObject*)(obj))->ob_type) == (&PyComplex_Type) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (&PyComplex_Type )))) | |||
| 272 | tmp = PyObject_GetAttrString(obj,"real"); | |||
| 273 | else if (PyString_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 27))) != 0) || PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 28))) != 0)) | |||
| 274 | /*pass*/; | |||
| 275 | else if (PySequence_Check(obj)) | |||
| 276 | tmp = PySequence_GetItem(obj,0); | |||
| 277 | if (tmp) { | |||
| 278 | PyErr_Clear(); | |||
| 279 | if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); return 1;} | |||
| 280 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 281 | } | |||
| 282 | { | |||
| 283 | PyObject* err = PyErr_Occurred(); | |||
| 284 | if (err==NULL((void*)0)) err = _fblas_error; | |||
| 285 | PyErr_SetString(err,errmess); | |||
| 286 | } | |||
| 287 | return 0; | |||
| 288 | } | |||
| 289 | ||||
| 290 | static int float_from_pyobj(float* v,PyObject *obj,const char *errmess) { | |||
| 291 | double d=0.0; | |||
| 292 | if (double_from_pyobj(&d,obj,errmess)) { | |||
| 293 | *v = (float)d; | |||
| 294 | return 1; | |||
| 295 | } | |||
| 296 | return 0; | |||
| 297 | } | |||
| 298 | ||||
| 299 | static int complex_float_from_pyobj(complex_float* v,PyObject *obj,const char *errmess) { | |||
| 300 | complex_double cd={0.0,0.0}; | |||
| 301 | if (complex_double_from_pyobj(&cd,obj,errmess)) { | |||
| 302 | (*v).r = (float)cd.r; | |||
| 303 | (*v).i = (float)cd.i; | |||
| 304 | return 1; | |||
| 305 | } | |||
| 306 | return 0; | |||
| 307 | } | |||
| 308 | ||||
| 309 | static int int_from_pyobj(int* v,PyObject *obj,const char *errmess) { | |||
| 310 | PyObject* tmp = NULL((void*)0); | |||
| 311 | if (PyInt_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 24))) != 0)) { | |||
| 312 | *v = (int)PyInt_AS_LONGPyLong_AsLong(obj); | |||
| 313 | return 1; | |||
| 314 | } | |||
| 315 | tmp = PyNumber_IntPyNumber_Long(obj); | |||
| 316 | if (tmp) { | |||
| 317 | *v = PyInt_AS_LONGPyLong_AsLong(tmp); | |||
| 318 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 319 | return 1; | |||
| 320 | } | |||
| 321 | if (PyComplex_Check(obj)((((PyObject*)(obj))->ob_type) == (&PyComplex_Type) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (&PyComplex_Type )))) | |||
| 322 | tmp = PyObject_GetAttrString(obj,"real"); | |||
| 323 | else if (PyString_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 27))) != 0) || PyUnicode_Check(obj)((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL << 28))) != 0)) | |||
| 324 | /*pass*/; | |||
| 325 | else if (PySequence_Check(obj)) | |||
| 326 | tmp = PySequence_GetItem(obj,0); | |||
| 327 | if (tmp) { | |||
| 328 | PyErr_Clear(); | |||
| 329 | if (int_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); return 1;} | |||
| 330 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 331 | } | |||
| 332 | { | |||
| 333 | PyObject* err = PyErr_Occurred(); | |||
| 334 | if (err==NULL((void*)0)) err = _fblas_error; | |||
| 335 | PyErr_SetString(err,errmess); | |||
| 336 | } | |||
| 337 | return 0; | |||
| 338 | } | |||
| 339 | ||||
| 340 | static struct { int nd;npy_intp *d;int *i,*i_tr,tr; } forcombcache; | |||
| 341 | static int initforcomb(npy_intp *dims,int nd,int tr) { | |||
| 342 | int k; | |||
| 343 | if (dims==NULL((void*)0)) return 0; | |||
| 344 | if (nd<0) return 0; | |||
| 345 | forcombcache.nd = nd; | |||
| 346 | forcombcache.d = dims; | |||
| 347 | forcombcache.tr = tr; | |||
| 348 | if ((forcombcache.i = (int *)malloc(sizeof(int)*nd))==NULL((void*)0)) return 0; | |||
| 349 | if ((forcombcache.i_tr = (int *)malloc(sizeof(int)*nd))==NULL((void*)0)) return 0; | |||
| 350 | for (k=1;k<nd;k++) { | |||
| 351 | forcombcache.i[k] = forcombcache.i_tr[nd-k-1] = 0; | |||
| 352 | } | |||
| 353 | forcombcache.i[0] = forcombcache.i_tr[nd-1] = -1; | |||
| 354 | return 1; | |||
| 355 | } | |||
| 356 | static int *nextforcomb(void) { | |||
| 357 | int j,*i,*i_tr,k; | |||
| 358 | int nd=forcombcache.nd; | |||
| 359 | if ((i=forcombcache.i) == NULL((void*)0)) return NULL((void*)0); | |||
| 360 | if ((i_tr=forcombcache.i_tr) == NULL((void*)0)) return NULL((void*)0); | |||
| 361 | if (forcombcache.d == NULL((void*)0)) return NULL((void*)0); | |||
| 362 | i[0]++; | |||
| 363 | if (i[0]==forcombcache.d[0]) { | |||
| 364 | j=1; | |||
| 365 | while ((j<nd) && (i[j]==forcombcache.d[j]-1)) j++; | |||
| 366 | if (j==nd) { | |||
| 367 | free(i); | |||
| 368 | free(i_tr); | |||
| 369 | return NULL((void*)0); | |||
| 370 | } | |||
| 371 | for (k=0;k<j;k++) i[k] = i_tr[nd-k-1] = 0; | |||
| 372 | i[j]++; | |||
| 373 | i_tr[nd-j-1]++; | |||
| 374 | } else | |||
| 375 | i_tr[nd-1]++; | |||
| 376 | if (forcombcache.tr) return i_tr; | |||
| 377 | return i; | |||
| 378 | } | |||
| 379 | ||||
| 380 | /********************* See f2py2e/cfuncs.py: userincludes *********************/ | |||
| 381 | /*need_userincludes*/ | |||
| 382 | ||||
| 383 | /********************* See f2py2e/capi_rules.py: usercode *********************/ | |||
| 384 | /* start usercode multiline (0) */ | |||
| 385 | ||||
| 386 | #define F_INTint int | |||
| 387 | ||||
| 388 | /* end multiline (0)*/ | |||
| 389 | ||||
| 390 | /* See f2py2e/rules.py */ | |||
| 391 | extern void F_FUNC(srotg,SROTG)srotg_(float*,float*,float*,float* ); | |||
| 392 | extern void F_FUNC(drotg,DROTG)drotg_(double*,double*,double*,double* ); | |||
| 393 | extern void F_FUNC(crotg,CROTG)crotg_(complex_float*,complex_float*,complex_float*,complex_float* ); | |||
| 394 | extern void F_FUNC(zrotg,ZROTG)zrotg_(complex_double*,complex_double*,complex_double*,complex_double* ); | |||
| 395 | extern void F_FUNC(srotmg,SROTMG)srotmg_(float*,float*,float*,float*,float* ); | |||
| 396 | extern void F_FUNC(drotmg,DROTMG)drotmg_(double*,double*,double*,double*,double* ); | |||
| 397 | extern void F_FUNC(srot,SROT)srot_(F_INTint*,float*,F_INTint*,float*,F_INTint*,float*,float* ); | |||
| 398 | extern void F_FUNC(drot,DROT)drot_(F_INTint*,double*,F_INTint*,double*,F_INTint*,double*,double* ); | |||
| 399 | extern void F_FUNC(csrot,CSROT)csrot_(F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint*,float*,float* ); | |||
| 400 | extern void F_FUNC(zdrot,ZDROT)zdrot_(F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint*,double*,double* ); | |||
| 401 | extern void F_FUNC(srotm,SROTM)srotm_(F_INTint*,float*,F_INTint*,float*,F_INTint*,float* ); | |||
| 402 | extern void F_FUNC(drotm,DROTM)drotm_(F_INTint*,double*,F_INTint*,double*,F_INTint*,double* ); | |||
| 403 | extern void F_FUNC(sswap,SSWAP)sswap_(F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 404 | extern void F_FUNC(dswap,DSWAP)dswap_(F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 405 | extern void F_FUNC(cswap,CSWAP)cswap_(F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 406 | extern void F_FUNC(zswap,ZSWAP)zswap_(F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 407 | extern void F_FUNC(sscal,SSCAL)sscal_(F_INTint*,float*,float*,F_INTint* ); | |||
| 408 | extern void F_FUNC(dscal,DSCAL)dscal_(F_INTint*,double*,double*,F_INTint* ); | |||
| 409 | extern void F_FUNC(cscal,CSCAL)cscal_(F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 410 | extern void F_FUNC(zscal,ZSCAL)zscal_(F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 411 | extern void F_FUNC(csscal,CSSCAL)csscal_(F_INTint*,float*,complex_float*,F_INTint* ); | |||
| 412 | extern void F_FUNC(zdscal,ZDSCAL)zdscal_(F_INTint*,double*,complex_double*,F_INTint* ); | |||
| 413 | extern void F_FUNC(scopy,SCOPY)scopy_(F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 414 | extern void F_FUNC(dcopy,DCOPY)dcopy_(F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 415 | extern void F_FUNC(ccopy,CCOPY)ccopy_(F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 416 | extern void F_FUNC(zcopy,ZCOPY)zcopy_(F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 417 | extern void F_FUNC(saxpy,SAXPY)saxpy_(F_INTint*,float*,float*,F_INTint*,float*,F_INTint* ); | |||
| 418 | extern void F_FUNC(daxpy,DAXPY)daxpy_(F_INTint*,double*,double*,F_INTint*,double*,F_INTint* ); | |||
| 419 | extern void F_FUNC(caxpy,CAXPY)caxpy_(F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 420 | extern void F_FUNC(zaxpy,ZAXPY)zaxpy_(F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 421 | extern void F_WRAPPEDFUNC(sdot,SDOT)f2pywrapsdot_(float*,F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 422 | extern void F_WRAPPEDFUNC(ddot,DDOT)f2pywrapddot_(double*,F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 423 | extern void F_WRAPPEDFUNC(cdotu,CDOTU)f2pywrapcdotu_(complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 424 | extern void F_WRAPPEDFUNC(zdotu,ZDOTU)f2pywrapzdotu_(complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 425 | extern void F_WRAPPEDFUNC(cdotc,CDOTC)f2pywrapcdotc_(complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 426 | extern void F_WRAPPEDFUNC(zdotc,ZDOTC)f2pywrapzdotc_(complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 427 | extern void F_WRAPPEDFUNC(snrm2,SNRM2)f2pywrapsnrm2_(float*,F_INTint*,float*,F_INTint* ); | |||
| 428 | extern void F_WRAPPEDFUNC(scnrm2,SCNRM2)f2pywrapscnrm2_(float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 429 | extern void F_WRAPPEDFUNC(dnrm2,DNRM2)f2pywrapdnrm2_(double*,F_INTint*,double*,F_INTint* ); | |||
| 430 | extern void F_WRAPPEDFUNC(dznrm2,DZNRM2)f2pywrapdznrm2_(double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 431 | extern void F_WRAPPEDFUNC(sasum,SASUM)f2pywrapsasum_(float*,F_INTint*,float*,F_INTint* ); | |||
| 432 | extern void F_WRAPPEDFUNC(scasum,SCASUM)f2pywrapscasum_(float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 433 | extern void F_WRAPPEDFUNC(dasum,DASUM)f2pywrapdasum_(double*,F_INTint*,double*,F_INTint* ); | |||
| 434 | extern void F_WRAPPEDFUNC(dzasum,DZASUM)f2pywrapdzasum_(double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 435 | extern int F_FUNC(isamax,ISAMAX)isamax_ (F_INTint*,float*,F_INTint* ); | |||
| 436 | extern int F_FUNC(idamax,IDAMAX)idamax_ (F_INTint*,double*,F_INTint* ); | |||
| 437 | extern int F_FUNC(icamax,ICAMAX)icamax_ (F_INTint*,complex_float*,F_INTint* ); | |||
| 438 | extern int F_FUNC(izamax,IZAMAX)izamax_ (F_INTint*,complex_double*,F_INTint* ); | |||
| 439 | extern void F_FUNC(sgemv,SGEMV)sgemv_(char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*, float*,F_INTint* ); | |||
| 440 | extern void F_FUNC(dgemv,DGEMV)dgemv_(char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*, double*,F_INTint* ); | |||
| 441 | extern void F_FUNC(cgemv,CGEMV)cgemv_(char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* ); | |||
| 442 | extern void F_FUNC(zgemv,ZGEMV)zgemv_(char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* ); | |||
| 443 | extern void F_FUNC(sgbmv,SGBMV)sgbmv_(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*,float*,F_INTint* ); | |||
| 444 | extern void F_FUNC(dgbmv,DGBMV)dgbmv_(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*,double*,F_INTint* ); | |||
| 445 | extern void F_FUNC(cgbmv,CGBMV)cgbmv_(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 446 | extern void F_FUNC(zgbmv,ZGBMV)zgbmv_(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 447 | extern void F_FUNC(ssbmv,SSBMV)ssbmv_(char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*,float*,F_INTint* ); | |||
| 448 | extern void F_FUNC(dsbmv,DSBMV)dsbmv_(char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*,double*,F_INTint* ); | |||
| 449 | extern void F_FUNC(chbmv,CHBMV)chbmv_(char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 450 | extern void F_FUNC(zhbmv,ZHBMV)zhbmv_(char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 451 | extern void F_FUNC(sspmv,SSPMV)sspmv_(char*,F_INTint*,float*,float*,float*,F_INTint*,float*,float*,F_INTint* ); | |||
| 452 | extern void F_FUNC(dspmv,DSPMV)dspmv_(char*,F_INTint*,double*,double*,double*,F_INTint*,double*,double*,F_INTint* ); | |||
| 453 | extern void F_FUNC(cspmv,CSPMV)cspmv_(char*,F_INTint*,complex_float*,complex_float*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 454 | extern void F_FUNC(zspmv,ZSPMV)zspmv_(char*,F_INTint*,complex_double*,complex_double*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 455 | extern void F_FUNC(chpmv,CHPMV)chpmv_(char*,F_INTint*,complex_float*,complex_float*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 456 | extern void F_FUNC(zhpmv,ZHPMV)zhpmv_(char*,F_INTint*,complex_double*,complex_double*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 457 | extern void F_FUNC(ssymv,SSYMV)ssymv_(char*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*, float*,F_INTint* ); | |||
| 458 | extern void F_FUNC(dsymv,DSYMV)dsymv_(char*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*, double*,F_INTint* ); | |||
| 459 | extern void F_FUNC(chemv,CHEMV)chemv_(char*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* ); | |||
| 460 | extern void F_FUNC(zhemv,ZHEMV)zhemv_(char*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* ); | |||
| 461 | extern void F_FUNC(sger,SGER)sger_(int*,int*,float*,float*,int*,float*,int*,float*,int*); | |||
| 462 | extern void F_FUNC(dger,DGER)dger_(int*,int*,double*,double*,int*,double*,int*,double*,int*); | |||
| 463 | extern void F_FUNC(cgeru,CGERU)cgeru_(int*,int*,complex_float*,complex_float*,int*,complex_float*,int*,complex_float*,int*); | |||
| 464 | extern void F_FUNC(zgeru,ZGERU)zgeru_(int*,int*,complex_double*,complex_double*,int*,complex_double*,int*,complex_double*,int*); | |||
| 465 | extern void F_FUNC(cgerc,CGERC)cgerc_(int*,int*,complex_float*,complex_float*,int*,complex_float*,int*,complex_float*,int*); | |||
| 466 | extern void F_FUNC(zgerc,ZGERC)zgerc_(int*,int*,complex_double*,complex_double*,int*,complex_double*,int*,complex_double*,int*); | |||
| 467 | extern void F_FUNC(ssyr,SSYR)ssyr_(char*, F_INTint*, float*, float*, F_INTint*, float*, F_INTint* ); | |||
| 468 | extern void F_FUNC(dsyr,DSYR)dsyr_(char*, F_INTint*, double*, double*, F_INTint*, double*, F_INTint* ); | |||
| 469 | extern void F_FUNC(csyr,CSYR)csyr_(char*, F_INTint*, complex_float*, complex_float*, F_INTint*, complex_float*, F_INTint* ); | |||
| 470 | extern void F_FUNC(zsyr,ZSYR)zsyr_(char*, F_INTint*, complex_double*, complex_double*, F_INTint*, complex_double*, F_INTint* ); | |||
| 471 | extern void F_FUNC(cher,CHER)cher_(char*, F_INTint*, complex_float*, complex_float*, F_INTint*, complex_float*, F_INTint* ); | |||
| 472 | extern void F_FUNC(zher,ZHER)zher_(char*, F_INTint*, complex_double*, complex_double*, F_INTint*, complex_double*, F_INTint* ); | |||
| 473 | extern void F_FUNC(ssyr2,SSYR2)ssyr2_(char*, F_INTint*, float*, float*, F_INTint*, float*, F_INTint*, float*, F_INTint* ); | |||
| 474 | extern void F_FUNC(dsyr2,DSYR2)dsyr2_(char*, F_INTint*, double*, double*, F_INTint*, double*, F_INTint*, double*, F_INTint* ); | |||
| 475 | extern void F_FUNC(cher2,CHER2)cher2_(char*, F_INTint*, complex_float*, complex_float*, F_INTint*, complex_float*, F_INTint*, complex_float*, F_INTint* ); | |||
| 476 | extern void F_FUNC(zher2,ZHER2)zher2_(char*, F_INTint*, complex_double*, complex_double*, F_INTint*, complex_double*, F_INTint*, complex_double*, F_INTint* ); | |||
| 477 | extern void F_FUNC(sspr,SSPR)sspr_(char*,F_INTint*,float*,float*,F_INTint*,float* ); | |||
| 478 | extern void F_FUNC(dspr,DSPR)dspr_(char*,F_INTint*,double*,double*,F_INTint*,double* ); | |||
| 479 | extern void F_FUNC(cspr,CSPR)cspr_(char*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float* ); | |||
| 480 | extern void F_FUNC(zspr,ZSPR)zspr_(char*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double* ); | |||
| 481 | extern void F_FUNC(chpr,CHPR)chpr_(char*,F_INTint*,float*,complex_float*,F_INTint*,complex_float* ); | |||
| 482 | extern void F_FUNC(zhpr,ZHPR)zhpr_(char*,F_INTint*,double*,complex_double*,F_INTint*,complex_double* ); | |||
| 483 | extern void F_FUNC(sspr2,SSPR2)sspr2_(char*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float* ); | |||
| 484 | extern void F_FUNC(dspr2,DSPR2)dspr2_(char*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double* ); | |||
| 485 | extern void F_FUNC(chpr2,CHPR2)chpr2_(char*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float* ); | |||
| 486 | extern void F_FUNC(zhpr2,ZHPR2)zhpr2_(char*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double* ); | |||
| 487 | extern void F_FUNC(stbsv,STBSV)stbsv_(char*,char*,char*,F_INTint*,F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 488 | extern void F_FUNC(dtbsv,DTBSV)dtbsv_(char*,char*,char*,F_INTint*,F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 489 | extern void F_FUNC(ctbsv,CTBSV)ctbsv_(char*,char*,char*,F_INTint*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 490 | extern void F_FUNC(ztbsv,ZTBSV)ztbsv_(char*,char*,char*,F_INTint*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 491 | extern void F_FUNC(stpsv,STPSV)stpsv_(char*,char*,char*,F_INTint*,float*,float*,F_INTint* ); | |||
| 492 | extern void F_FUNC(dtpsv,DTPSV)dtpsv_(char*,char*,char*,F_INTint*,double*,double*,F_INTint* ); | |||
| 493 | extern void F_FUNC(ctpsv,CTPSV)ctpsv_(char*,char*,char*,F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 494 | extern void F_FUNC(ztpsv,ZTPSV)ztpsv_(char*,char*,char*,F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 495 | extern void F_FUNC(strmv,STRMV)strmv_(char*,char*,char*,F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 496 | extern void F_FUNC(dtrmv,DTRMV)dtrmv_(char*,char*,char*,F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 497 | extern void F_FUNC(ctrmv,CTRMV)ctrmv_(char*,char*,char*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 498 | extern void F_FUNC(ztrmv,ZTRMV)ztrmv_(char*,char*,char*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 499 | extern void F_FUNC(strsv,STRSV)strsv_(char*,char*,char*,F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 500 | extern void F_FUNC(dtrsv,DTRSV)dtrsv_(char*,char*,char*,F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 501 | extern void F_FUNC(ctrsv,CTRSV)ctrsv_(char*,char*,char*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 502 | extern void F_FUNC(ztrsv,ZTRSV)ztrsv_(char*,char*,char*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 503 | extern void F_FUNC(stbmv,STBMV)stbmv_(char*,char*,char*,F_INTint*,F_INTint*,float*,F_INTint*,float*,F_INTint* ); | |||
| 504 | extern void F_FUNC(dtbmv,DTBMV)dtbmv_(char*,char*,char*,F_INTint*,F_INTint*,double*,F_INTint*,double*,F_INTint* ); | |||
| 505 | extern void F_FUNC(ctbmv,CTBMV)ctbmv_(char*,char*,char*,F_INTint*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* ); | |||
| 506 | extern void F_FUNC(ztbmv,ZTBMV)ztbmv_(char*,char*,char*,F_INTint*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* ); | |||
| 507 | extern void F_FUNC(stpmv,STPMV)stpmv_(char*,char*,char*,F_INTint*,float*,float*,F_INTint* ); | |||
| 508 | extern void F_FUNC(dtpmv,DTPMV)dtpmv_(char*,char*,char*,F_INTint*,double*,double*,F_INTint* ); | |||
| 509 | extern void F_FUNC(ctpmv,CTPMV)ctpmv_(char*,char*,char*,F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 510 | extern void F_FUNC(ztpmv,ZTPMV)ztpmv_(char*,char*,char*,F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 511 | extern void F_FUNC(sgemm,SGEMM)sgemm_(char*,char*,F_INTint*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*, F_INTint*,float*,float*,F_INTint* ); | |||
| 512 | extern void F_FUNC(dgemm,DGEMM)dgemm_(char*,char*,F_INTint*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*, F_INTint*,double*,double*,F_INTint* ); | |||
| 513 | extern void F_FUNC(cgemm,CGEMM)cgemm_(char*,char*,F_INTint*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 514 | extern void F_FUNC(zgemm,ZGEMM)zgemm_(char*,char*,F_INTint*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 515 | extern void F_FUNC(ssymm,SSYMM)ssymm_(char*,char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*, F_INTint*,float*,float*,F_INTint* ); | |||
| 516 | extern void F_FUNC(dsymm,DSYMM)dsymm_(char*,char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*, F_INTint*,double*,double*,F_INTint* ); | |||
| 517 | extern void F_FUNC(csymm,CSYMM)csymm_(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 518 | extern void F_FUNC(zsymm,ZSYMM)zsymm_(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 519 | extern void F_FUNC(chemm,CHEMM)chemm_(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint*,complex_float*,complex_float*,F_INTint* ); | |||
| 520 | extern void F_FUNC(zhemm,ZHEMM)zhemm_(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint*,complex_double*,complex_double*,F_INTint* ); | |||
| 521 | extern void F_FUNC(ssyrk,SSYRK)ssyrk_(char*,char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*, float*,F_INTint* ); | |||
| 522 | extern void F_FUNC(dsyrk,DSYRK)dsyrk_(char*,char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*, double*,F_INTint* ); | |||
| 523 | extern void F_FUNC(csyrk,CSYRK)csyrk_(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* ); | |||
| 524 | extern void F_FUNC(zsyrk,ZSYRK)zsyrk_(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* ); | |||
| 525 | extern void F_FUNC(cherk,CHERK)cherk_(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* ); | |||
| 526 | extern void F_FUNC(zherk,ZHERK)zherk_(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* ); | |||
| 527 | extern void F_FUNC(ssyr2k,SSYR2K)ssyr2k_(char*,char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*, float*, float*,F_INTint* ); | |||
| 528 | extern void F_FUNC(dsyr2k,DSYR2K)dsyr2k_(char*,char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*, double*, double*,F_INTint* ); | |||
| 529 | extern void F_FUNC(csyr2k,CSYR2K)csyr2k_(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*, complex_float*, complex_float*,F_INTint* ); | |||
| 530 | extern void F_FUNC(zsyr2k,ZSYR2K)zsyr2k_(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*, complex_double*, complex_double*,F_INTint* ); | |||
| 531 | extern void F_FUNC(cher2k,CHER2K)cher2k_(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*, complex_float*, complex_float*,F_INTint* ); | |||
| 532 | extern void F_FUNC(zher2k,ZHER2K)zher2k_(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*, complex_double*, complex_double*,F_INTint* ); | |||
| 533 | extern void F_FUNC(strmm,STRMM)strmm_(char*, char*, char*, char*, F_INTint*, F_INTint*, float*,float*,F_INTint*,float*, F_INTint* ); | |||
| 534 | extern void F_FUNC(dtrmm,DTRMM)dtrmm_(char*, char*, char*, char*, F_INTint*, F_INTint*, double*,double*,F_INTint*,double*, F_INTint* ); | |||
| 535 | extern void F_FUNC(ctrmm,CTRMM)ctrmm_(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint* ); | |||
| 536 | extern void F_FUNC(ztrmm,ZTRMM)ztrmm_(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint* ); | |||
| 537 | extern void F_FUNC(strsm,STRSM)strsm_(char*, char*, char*, char*, F_INTint*, F_INTint*, float*,float*,F_INTint*,float*, F_INTint* ); | |||
| 538 | extern void F_FUNC(dtrsm,DTRSM)dtrsm_(char*, char*, char*, char*, F_INTint*, F_INTint*, double*,double*,F_INTint*,double*, F_INTint* ); | |||
| 539 | extern void F_FUNC(ctrsm,CTRSM)ctrsm_(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint* ); | |||
| 540 | extern void F_FUNC(ztrsm,ZTRSM)ztrsm_(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint* ); | |||
| 541 | /*eof externroutines*/ | |||
| 542 | ||||
| 543 | /******************** See f2py2e/capi_rules.py: usercode1 ********************/ | |||
| 544 | ||||
| 545 | ||||
| 546 | /******************* See f2py2e/cb_rules.py: buildcallback *******************/ | |||
| 547 | /*need_callbacks*/ | |||
| 548 | ||||
| 549 | /*********************** See f2py2e/rules.py: buildapi ***********************/ | |||
| 550 | ||||
| 551 | /*********************************** srotg ***********************************/ | |||
| 552 | static char doc_f2py_rout__fblas_srotg[] = "\ | |||
| 553 | c,s = srotg(a,b)\n\nWrapper for ``srotg``.\ | |||
| 554 | \n\nParameters\n----------\n" | |||
| 555 | "a : input float\n" | |||
| 556 | "b : input float\n" | |||
| 557 | "\nReturns\n-------\n" | |||
| 558 | "c : float\n" | |||
| 559 | "s : float"; | |||
| 560 | /* extern void F_FUNC(srotg,SROTG)(float*,float*,float*,float* ); */ | |||
| 561 | static PyObject *f2py_rout__fblas_srotg(const PyObject *capi_self, | |||
| 562 | PyObject *capi_args, | |||
| 563 | PyObject *capi_keywds, | |||
| 564 | void (*f2py_func)(float*,float*,float*,float* )) { | |||
| 565 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 566 | volatile int f2py_success = 1; | |||
| 567 | /*decl*/ | |||
| 568 | ||||
| 569 | float a = 0; | |||
| 570 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 571 | float b = 0; | |||
| 572 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 573 | float c = 0; | |||
| 574 | float s = 0; | |||
| 575 | static char *capi_kwlist[] = {"a","b",NULL((void*)0)}; | |||
| 576 | ||||
| 577 | /*routdebugenter*/ | |||
| 578 | #ifdef F2PY_REPORT_ATEXIT | |||
| 579 | f2py_start_clock(); | |||
| 580 | #endif | |||
| 581 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 582 | "OO:_fblas.srotg",\ | |||
| 583 | capi_kwlist,&a_capi,&b_capi)) | |||
| 584 | return NULL((void*)0); | |||
| 585 | /*frompyobj*/ | |||
| 586 | /* Processing variable a */ | |||
| 587 | f2py_success = float_from_pyobj(&a,a_capi,"_fblas.srotg() 1st argument (a) can't be converted to float"); | |||
| 588 | if (f2py_success) { | |||
| 589 | /* Processing variable b */ | |||
| 590 | f2py_success = float_from_pyobj(&b,b_capi,"_fblas.srotg() 2nd argument (b) can't be converted to float"); | |||
| 591 | if (f2py_success) { | |||
| 592 | /* Processing variable c */ | |||
| 593 | /* Processing variable s */ | |||
| 594 | /*end of frompyobj*/ | |||
| 595 | #ifdef F2PY_REPORT_ATEXIT | |||
| 596 | f2py_start_call_clock(); | |||
| 597 | #endif | |||
| 598 | /*callfortranroutine*/ | |||
| 599 | (*f2py_func)(&a,&b,&c,&s); | |||
| 600 | if (PyErr_Occurred()) | |||
| 601 | f2py_success = 0; | |||
| 602 | #ifdef F2PY_REPORT_ATEXIT | |||
| 603 | f2py_stop_call_clock(); | |||
| 604 | #endif | |||
| 605 | /*end of callfortranroutine*/ | |||
| 606 | if (f2py_success) { | |||
| 607 | /*pyobjfrom*/ | |||
| 608 | /*end of pyobjfrom*/ | |||
| 609 | CFUNCSMESS("Building return value.\n"); | |||
| 610 | capi_buildvalue = Py_BuildValue("ff",c,s); | |||
| 611 | /*closepyobjfrom*/ | |||
| 612 | /*end of closepyobjfrom*/ | |||
| 613 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 614 | /*cleanupfrompyobj*/ | |||
| 615 | /* End of cleaning variable s */ | |||
| 616 | /* End of cleaning variable c */ | |||
| 617 | } /*if (f2py_success) of b*/ | |||
| 618 | /* End of cleaning variable b */ | |||
| 619 | } /*if (f2py_success) of a*/ | |||
| 620 | /* End of cleaning variable a */ | |||
| 621 | /*end of cleanupfrompyobj*/ | |||
| 622 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 623 | /*routdebugfailure*/ | |||
| 624 | } else { | |||
| 625 | /*routdebugleave*/ | |||
| 626 | } | |||
| 627 | CFUNCSMESS("Freeing memory.\n"); | |||
| 628 | /*freemem*/ | |||
| 629 | #ifdef F2PY_REPORT_ATEXIT | |||
| 630 | f2py_stop_clock(); | |||
| 631 | #endif | |||
| 632 | return capi_buildvalue; | |||
| 633 | } | |||
| 634 | /******************************** end of srotg ********************************/ | |||
| 635 | ||||
| 636 | /*********************************** drotg ***********************************/ | |||
| 637 | static char doc_f2py_rout__fblas_drotg[] = "\ | |||
| 638 | c,s = drotg(a,b)\n\nWrapper for ``drotg``.\ | |||
| 639 | \n\nParameters\n----------\n" | |||
| 640 | "a : input float\n" | |||
| 641 | "b : input float\n" | |||
| 642 | "\nReturns\n-------\n" | |||
| 643 | "c : float\n" | |||
| 644 | "s : float"; | |||
| 645 | /* extern void F_FUNC(drotg,DROTG)(double*,double*,double*,double* ); */ | |||
| 646 | static PyObject *f2py_rout__fblas_drotg(const PyObject *capi_self, | |||
| 647 | PyObject *capi_args, | |||
| 648 | PyObject *capi_keywds, | |||
| 649 | void (*f2py_func)(double*,double*,double*,double* )) { | |||
| 650 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 651 | volatile int f2py_success = 1; | |||
| 652 | /*decl*/ | |||
| 653 | ||||
| 654 | double a = 0; | |||
| 655 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 656 | double b = 0; | |||
| 657 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 658 | double c = 0; | |||
| 659 | double s = 0; | |||
| 660 | static char *capi_kwlist[] = {"a","b",NULL((void*)0)}; | |||
| 661 | ||||
| 662 | /*routdebugenter*/ | |||
| 663 | #ifdef F2PY_REPORT_ATEXIT | |||
| 664 | f2py_start_clock(); | |||
| 665 | #endif | |||
| 666 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 667 | "OO:_fblas.drotg",\ | |||
| 668 | capi_kwlist,&a_capi,&b_capi)) | |||
| 669 | return NULL((void*)0); | |||
| 670 | /*frompyobj*/ | |||
| 671 | /* Processing variable a */ | |||
| 672 | f2py_success = double_from_pyobj(&a,a_capi,"_fblas.drotg() 1st argument (a) can't be converted to double"); | |||
| 673 | if (f2py_success) { | |||
| 674 | /* Processing variable b */ | |||
| 675 | f2py_success = double_from_pyobj(&b,b_capi,"_fblas.drotg() 2nd argument (b) can't be converted to double"); | |||
| 676 | if (f2py_success) { | |||
| 677 | /* Processing variable c */ | |||
| 678 | /* Processing variable s */ | |||
| 679 | /*end of frompyobj*/ | |||
| 680 | #ifdef F2PY_REPORT_ATEXIT | |||
| 681 | f2py_start_call_clock(); | |||
| 682 | #endif | |||
| 683 | /*callfortranroutine*/ | |||
| 684 | (*f2py_func)(&a,&b,&c,&s); | |||
| 685 | if (PyErr_Occurred()) | |||
| 686 | f2py_success = 0; | |||
| 687 | #ifdef F2PY_REPORT_ATEXIT | |||
| 688 | f2py_stop_call_clock(); | |||
| 689 | #endif | |||
| 690 | /*end of callfortranroutine*/ | |||
| 691 | if (f2py_success) { | |||
| 692 | /*pyobjfrom*/ | |||
| 693 | /*end of pyobjfrom*/ | |||
| 694 | CFUNCSMESS("Building return value.\n"); | |||
| 695 | capi_buildvalue = Py_BuildValue("dd",c,s); | |||
| 696 | /*closepyobjfrom*/ | |||
| 697 | /*end of closepyobjfrom*/ | |||
| 698 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 699 | /*cleanupfrompyobj*/ | |||
| 700 | /* End of cleaning variable s */ | |||
| 701 | /* End of cleaning variable c */ | |||
| 702 | } /*if (f2py_success) of b*/ | |||
| 703 | /* End of cleaning variable b */ | |||
| 704 | } /*if (f2py_success) of a*/ | |||
| 705 | /* End of cleaning variable a */ | |||
| 706 | /*end of cleanupfrompyobj*/ | |||
| 707 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 708 | /*routdebugfailure*/ | |||
| 709 | } else { | |||
| 710 | /*routdebugleave*/ | |||
| 711 | } | |||
| 712 | CFUNCSMESS("Freeing memory.\n"); | |||
| 713 | /*freemem*/ | |||
| 714 | #ifdef F2PY_REPORT_ATEXIT | |||
| 715 | f2py_stop_clock(); | |||
| 716 | #endif | |||
| 717 | return capi_buildvalue; | |||
| 718 | } | |||
| 719 | /******************************** end of drotg ********************************/ | |||
| 720 | ||||
| 721 | /*********************************** crotg ***********************************/ | |||
| 722 | static char doc_f2py_rout__fblas_crotg[] = "\ | |||
| 723 | c,s = crotg(a,b)\n\nWrapper for ``crotg``.\ | |||
| 724 | \n\nParameters\n----------\n" | |||
| 725 | "a : input complex\n" | |||
| 726 | "b : input complex\n" | |||
| 727 | "\nReturns\n-------\n" | |||
| 728 | "c : complex\n" | |||
| 729 | "s : complex"; | |||
| 730 | /* extern void F_FUNC(crotg,CROTG)(complex_float*,complex_float*,complex_float*,complex_float* ); */ | |||
| 731 | static PyObject *f2py_rout__fblas_crotg(const PyObject *capi_self, | |||
| 732 | PyObject *capi_args, | |||
| 733 | PyObject *capi_keywds, | |||
| 734 | void (*f2py_func)(complex_float*,complex_float*,complex_float*,complex_float* )) { | |||
| 735 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 736 | volatile int f2py_success = 1; | |||
| 737 | /*decl*/ | |||
| 738 | ||||
| 739 | complex_float a; | |||
| 740 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 741 | complex_float b; | |||
| 742 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 743 | complex_float c; | |||
| 744 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 745 | complex_float s; | |||
| 746 | PyObject *s_capi = Py_None(&_Py_NoneStruct); | |||
| 747 | static char *capi_kwlist[] = {"a","b",NULL((void*)0)}; | |||
| 748 | ||||
| 749 | /*routdebugenter*/ | |||
| 750 | #ifdef F2PY_REPORT_ATEXIT | |||
| 751 | f2py_start_clock(); | |||
| 752 | #endif | |||
| 753 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 754 | "OO:_fblas.crotg",\ | |||
| 755 | capi_kwlist,&a_capi,&b_capi)) | |||
| 756 | return NULL((void*)0); | |||
| 757 | /*frompyobj*/ | |||
| 758 | /* Processing variable a */ | |||
| 759 | f2py_success = complex_float_from_pyobj(&a,a_capi,"_fblas.crotg() 1st argument (a) can't be converted to complex_float"); | |||
| 760 | if (f2py_success) { | |||
| 761 | /* Processing variable b */ | |||
| 762 | f2py_success = complex_float_from_pyobj(&b,b_capi,"_fblas.crotg() 2nd argument (b) can't be converted to complex_float"); | |||
| 763 | if (f2py_success) { | |||
| 764 | /* Processing variable c */ | |||
| 765 | /* Processing variable s */ | |||
| 766 | /*end of frompyobj*/ | |||
| 767 | #ifdef F2PY_REPORT_ATEXIT | |||
| 768 | f2py_start_call_clock(); | |||
| 769 | #endif | |||
| 770 | /*callfortranroutine*/ | |||
| 771 | (*f2py_func)(&a,&b,&c,&s); | |||
| 772 | if (PyErr_Occurred()) | |||
| 773 | f2py_success = 0; | |||
| 774 | #ifdef F2PY_REPORT_ATEXIT | |||
| 775 | f2py_stop_call_clock(); | |||
| 776 | #endif | |||
| 777 | /*end of callfortranroutine*/ | |||
| 778 | if (f2py_success) { | |||
| 779 | /*pyobjfrom*/ | |||
| 780 | c_capi = pyobj_from_complex_float1(c)(PyComplex_FromDoubles(c.r,c.i)); | |||
| 781 | s_capi = pyobj_from_complex_float1(s)(PyComplex_FromDoubles(s.r,s.i)); | |||
| 782 | /*end of pyobjfrom*/ | |||
| 783 | CFUNCSMESS("Building return value.\n"); | |||
| 784 | capi_buildvalue = Py_BuildValue("NN",c_capi,s_capi); | |||
| 785 | /*closepyobjfrom*/ | |||
| 786 | /*end of closepyobjfrom*/ | |||
| 787 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 788 | /*cleanupfrompyobj*/ | |||
| 789 | /* End of cleaning variable s */ | |||
| 790 | /* End of cleaning variable c */ | |||
| 791 | } /*if (f2py_success) of b frompyobj*/ | |||
| 792 | /* End of cleaning variable b */ | |||
| 793 | } /*if (f2py_success) of a frompyobj*/ | |||
| 794 | /* End of cleaning variable a */ | |||
| 795 | /*end of cleanupfrompyobj*/ | |||
| 796 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 797 | /*routdebugfailure*/ | |||
| 798 | } else { | |||
| 799 | /*routdebugleave*/ | |||
| 800 | } | |||
| 801 | CFUNCSMESS("Freeing memory.\n"); | |||
| 802 | /*freemem*/ | |||
| 803 | #ifdef F2PY_REPORT_ATEXIT | |||
| 804 | f2py_stop_clock(); | |||
| 805 | #endif | |||
| 806 | return capi_buildvalue; | |||
| 807 | } | |||
| 808 | /******************************** end of crotg ********************************/ | |||
| 809 | ||||
| 810 | /*********************************** zrotg ***********************************/ | |||
| 811 | static char doc_f2py_rout__fblas_zrotg[] = "\ | |||
| 812 | c,s = zrotg(a,b)\n\nWrapper for ``zrotg``.\ | |||
| 813 | \n\nParameters\n----------\n" | |||
| 814 | "a : input complex\n" | |||
| 815 | "b : input complex\n" | |||
| 816 | "\nReturns\n-------\n" | |||
| 817 | "c : complex\n" | |||
| 818 | "s : complex"; | |||
| 819 | /* extern void F_FUNC(zrotg,ZROTG)(complex_double*,complex_double*,complex_double*,complex_double* ); */ | |||
| 820 | static PyObject *f2py_rout__fblas_zrotg(const PyObject *capi_self, | |||
| 821 | PyObject *capi_args, | |||
| 822 | PyObject *capi_keywds, | |||
| 823 | void (*f2py_func)(complex_double*,complex_double*,complex_double*,complex_double* )) { | |||
| 824 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 825 | volatile int f2py_success = 1; | |||
| 826 | /*decl*/ | |||
| 827 | ||||
| 828 | complex_double a; | |||
| 829 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 830 | complex_double b; | |||
| 831 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 832 | complex_double c; | |||
| 833 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 834 | complex_double s; | |||
| 835 | PyObject *s_capi = Py_None(&_Py_NoneStruct); | |||
| 836 | static char *capi_kwlist[] = {"a","b",NULL((void*)0)}; | |||
| 837 | ||||
| 838 | /*routdebugenter*/ | |||
| 839 | #ifdef F2PY_REPORT_ATEXIT | |||
| 840 | f2py_start_clock(); | |||
| 841 | #endif | |||
| 842 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 843 | "OO:_fblas.zrotg",\ | |||
| 844 | capi_kwlist,&a_capi,&b_capi)) | |||
| 845 | return NULL((void*)0); | |||
| 846 | /*frompyobj*/ | |||
| 847 | /* Processing variable a */ | |||
| 848 | f2py_success = complex_double_from_pyobj(&a,a_capi,"_fblas.zrotg() 1st argument (a) can't be converted to complex_double"); | |||
| 849 | if (f2py_success) { | |||
| 850 | /* Processing variable b */ | |||
| 851 | f2py_success = complex_double_from_pyobj(&b,b_capi,"_fblas.zrotg() 2nd argument (b) can't be converted to complex_double"); | |||
| 852 | if (f2py_success) { | |||
| 853 | /* Processing variable c */ | |||
| 854 | /* Processing variable s */ | |||
| 855 | /*end of frompyobj*/ | |||
| 856 | #ifdef F2PY_REPORT_ATEXIT | |||
| 857 | f2py_start_call_clock(); | |||
| 858 | #endif | |||
| 859 | /*callfortranroutine*/ | |||
| 860 | (*f2py_func)(&a,&b,&c,&s); | |||
| 861 | if (PyErr_Occurred()) | |||
| 862 | f2py_success = 0; | |||
| 863 | #ifdef F2PY_REPORT_ATEXIT | |||
| 864 | f2py_stop_call_clock(); | |||
| 865 | #endif | |||
| 866 | /*end of callfortranroutine*/ | |||
| 867 | if (f2py_success) { | |||
| 868 | /*pyobjfrom*/ | |||
| 869 | c_capi = pyobj_from_complex_double1(c)(PyComplex_FromDoubles(c.r,c.i)); | |||
| 870 | s_capi = pyobj_from_complex_double1(s)(PyComplex_FromDoubles(s.r,s.i)); | |||
| 871 | /*end of pyobjfrom*/ | |||
| 872 | CFUNCSMESS("Building return value.\n"); | |||
| 873 | capi_buildvalue = Py_BuildValue("NN",c_capi,s_capi); | |||
| 874 | /*closepyobjfrom*/ | |||
| 875 | /*end of closepyobjfrom*/ | |||
| 876 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 877 | /*cleanupfrompyobj*/ | |||
| 878 | /* End of cleaning variable s */ | |||
| 879 | /* End of cleaning variable c */ | |||
| 880 | } /*if (f2py_success) of b frompyobj*/ | |||
| 881 | /* End of cleaning variable b */ | |||
| 882 | } /*if (f2py_success) of a frompyobj*/ | |||
| 883 | /* End of cleaning variable a */ | |||
| 884 | /*end of cleanupfrompyobj*/ | |||
| 885 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 886 | /*routdebugfailure*/ | |||
| 887 | } else { | |||
| 888 | /*routdebugleave*/ | |||
| 889 | } | |||
| 890 | CFUNCSMESS("Freeing memory.\n"); | |||
| 891 | /*freemem*/ | |||
| 892 | #ifdef F2PY_REPORT_ATEXIT | |||
| 893 | f2py_stop_clock(); | |||
| 894 | #endif | |||
| 895 | return capi_buildvalue; | |||
| 896 | } | |||
| 897 | /******************************** end of zrotg ********************************/ | |||
| 898 | ||||
| 899 | /*********************************** srotmg ***********************************/ | |||
| 900 | static char doc_f2py_rout__fblas_srotmg[] = "\ | |||
| 901 | param = srotmg(d1,d2,x1,y1)\n\nWrapper for ``srotmg``.\ | |||
| 902 | \n\nParameters\n----------\n" | |||
| 903 | "d1 : input float\n" | |||
| 904 | "d2 : input float\n" | |||
| 905 | "x1 : input float\n" | |||
| 906 | "y1 : input float\n" | |||
| 907 | "\nReturns\n-------\n" | |||
| 908 | "param : rank-1 array('f') with bounds (5)"; | |||
| 909 | /* extern void F_FUNC(srotmg,SROTMG)(float*,float*,float*,float*,float* ); */ | |||
| 910 | static PyObject *f2py_rout__fblas_srotmg(const PyObject *capi_self, | |||
| 911 | PyObject *capi_args, | |||
| 912 | PyObject *capi_keywds, | |||
| 913 | void (*f2py_func)(float*,float*,float*,float*,float* )) { | |||
| 914 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 915 | volatile int f2py_success = 1; | |||
| 916 | /*decl*/ | |||
| 917 | ||||
| 918 | float d1 = 0; | |||
| 919 | PyObject *d1_capi = Py_None(&_Py_NoneStruct); | |||
| 920 | float d2 = 0; | |||
| 921 | PyObject *d2_capi = Py_None(&_Py_NoneStruct); | |||
| 922 | float x1 = 0; | |||
| 923 | PyObject *x1_capi = Py_None(&_Py_NoneStruct); | |||
| 924 | float y1 = 0; | |||
| 925 | PyObject *y1_capi = Py_None(&_Py_NoneStruct); | |||
| 926 | float *param = NULL((void*)0); | |||
| 927 | npy_intp param_Dims[1] = {-1}; | |||
| 928 | const int param_Rank = 1; | |||
| 929 | PyArrayObject *capi_param_tmp = NULL((void*)0); | |||
| 930 | int capi_param_intent = 0; | |||
| 931 | static char *capi_kwlist[] = {"d1","d2","x1","y1",NULL((void*)0)}; | |||
| 932 | ||||
| 933 | /*routdebugenter*/ | |||
| 934 | #ifdef F2PY_REPORT_ATEXIT | |||
| 935 | f2py_start_clock(); | |||
| 936 | #endif | |||
| 937 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 938 | "OOOO:_fblas.srotmg",\ | |||
| 939 | capi_kwlist,&d1_capi,&d2_capi,&x1_capi,&y1_capi)) | |||
| 940 | return NULL((void*)0); | |||
| 941 | /*frompyobj*/ | |||
| 942 | /* Processing variable d1 */ | |||
| 943 | f2py_success = float_from_pyobj(&d1,d1_capi,"_fblas.srotmg() 1st argument (d1) can't be converted to float"); | |||
| 944 | if (f2py_success) { | |||
| 945 | /* Processing variable d2 */ | |||
| 946 | f2py_success = float_from_pyobj(&d2,d2_capi,"_fblas.srotmg() 2nd argument (d2) can't be converted to float"); | |||
| 947 | if (f2py_success) { | |||
| 948 | /* Processing variable x1 */ | |||
| 949 | f2py_success = float_from_pyobj(&x1,x1_capi,"_fblas.srotmg() 3rd argument (x1) can't be converted to float"); | |||
| 950 | if (f2py_success) { | |||
| 951 | /* Processing variable y1 */ | |||
| 952 | f2py_success = float_from_pyobj(&y1,y1_capi,"_fblas.srotmg() 4th argument (y1) can't be converted to float"); | |||
| 953 | if (f2py_success) { | |||
| 954 | /* Processing variable param */ | |||
| 955 | param_Dims[0]=5; | |||
| 956 | capi_param_intent |= F2PY_INTENT_OUT4|F2PY_INTENT_HIDE8; | |||
| 957 | capi_param_tmp = array_from_pyobj(NPY_FLOAT,param_Dims,param_Rank,capi_param_intent,Py_None(&_Py_NoneStruct)); | |||
| 958 | if (capi_param_tmp == NULL((void*)0)) { | |||
| 959 | if (!PyErr_Occurred()) | |||
| 960 | PyErr_SetString(_fblas_error,"failed in converting hidden `param' of _fblas.srotmg to C/Fortran array" ); | |||
| 961 | } else { | |||
| 962 | param = (float *)(PyArray_DATA(capi_param_tmp)((void *)((PyArrayObject_fields *)(capi_param_tmp))->data)); | |||
| 963 | ||||
| 964 | /*end of frompyobj*/ | |||
| 965 | #ifdef F2PY_REPORT_ATEXIT | |||
| 966 | f2py_start_call_clock(); | |||
| 967 | #endif | |||
| 968 | /*callfortranroutine*/ | |||
| 969 | (*f2py_func)(&d1,&d2,&x1,&y1,param) ; | |||
| 970 | /*(*f2py_func)(&d1,&d2,&x1,&y1,param);*/ | |||
| 971 | if (PyErr_Occurred()) | |||
| 972 | f2py_success = 0; | |||
| 973 | #ifdef F2PY_REPORT_ATEXIT | |||
| 974 | f2py_stop_call_clock(); | |||
| 975 | #endif | |||
| 976 | /*end of callfortranroutine*/ | |||
| 977 | if (f2py_success) { | |||
| 978 | /*pyobjfrom*/ | |||
| 979 | /*end of pyobjfrom*/ | |||
| 980 | CFUNCSMESS("Building return value.\n"); | |||
| 981 | capi_buildvalue = Py_BuildValue("N",capi_param_tmp); | |||
| 982 | /*closepyobjfrom*/ | |||
| 983 | /*end of closepyobjfrom*/ | |||
| 984 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 985 | /*cleanupfrompyobj*/ | |||
| 986 | } /*if (capi_param_tmp == NULL) ... else of param*/ | |||
| 987 | /* End of cleaning variable param */ | |||
| 988 | } /*if (f2py_success) of y1*/ | |||
| 989 | /* End of cleaning variable y1 */ | |||
| 990 | } /*if (f2py_success) of x1*/ | |||
| 991 | /* End of cleaning variable x1 */ | |||
| 992 | } /*if (f2py_success) of d2*/ | |||
| 993 | /* End of cleaning variable d2 */ | |||
| 994 | } /*if (f2py_success) of d1*/ | |||
| 995 | /* End of cleaning variable d1 */ | |||
| 996 | /*end of cleanupfrompyobj*/ | |||
| 997 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 998 | /*routdebugfailure*/ | |||
| 999 | } else { | |||
| 1000 | /*routdebugleave*/ | |||
| 1001 | } | |||
| 1002 | CFUNCSMESS("Freeing memory.\n"); | |||
| 1003 | /*freemem*/ | |||
| 1004 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1005 | f2py_stop_clock(); | |||
| 1006 | #endif | |||
| 1007 | return capi_buildvalue; | |||
| 1008 | } | |||
| 1009 | /******************************* end of srotmg *******************************/ | |||
| 1010 | ||||
| 1011 | /*********************************** drotmg ***********************************/ | |||
| 1012 | static char doc_f2py_rout__fblas_drotmg[] = "\ | |||
| 1013 | param = drotmg(d1,d2,x1,y1)\n\nWrapper for ``drotmg``.\ | |||
| 1014 | \n\nParameters\n----------\n" | |||
| 1015 | "d1 : input float\n" | |||
| 1016 | "d2 : input float\n" | |||
| 1017 | "x1 : input float\n" | |||
| 1018 | "y1 : input float\n" | |||
| 1019 | "\nReturns\n-------\n" | |||
| 1020 | "param : rank-1 array('d') with bounds (5)"; | |||
| 1021 | /* extern void F_FUNC(drotmg,DROTMG)(double*,double*,double*,double*,double* ); */ | |||
| 1022 | static PyObject *f2py_rout__fblas_drotmg(const PyObject *capi_self, | |||
| 1023 | PyObject *capi_args, | |||
| 1024 | PyObject *capi_keywds, | |||
| 1025 | void (*f2py_func)(double*,double*,double*,double*,double* )) { | |||
| 1026 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 1027 | volatile int f2py_success = 1; | |||
| 1028 | /*decl*/ | |||
| 1029 | ||||
| 1030 | double d1 = 0; | |||
| 1031 | PyObject *d1_capi = Py_None(&_Py_NoneStruct); | |||
| 1032 | double d2 = 0; | |||
| 1033 | PyObject *d2_capi = Py_None(&_Py_NoneStruct); | |||
| 1034 | double x1 = 0; | |||
| 1035 | PyObject *x1_capi = Py_None(&_Py_NoneStruct); | |||
| 1036 | double y1 = 0; | |||
| 1037 | PyObject *y1_capi = Py_None(&_Py_NoneStruct); | |||
| 1038 | double *param = NULL((void*)0); | |||
| 1039 | npy_intp param_Dims[1] = {-1}; | |||
| 1040 | const int param_Rank = 1; | |||
| 1041 | PyArrayObject *capi_param_tmp = NULL((void*)0); | |||
| 1042 | int capi_param_intent = 0; | |||
| 1043 | static char *capi_kwlist[] = {"d1","d2","x1","y1",NULL((void*)0)}; | |||
| 1044 | ||||
| 1045 | /*routdebugenter*/ | |||
| 1046 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1047 | f2py_start_clock(); | |||
| 1048 | #endif | |||
| 1049 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 1050 | "OOOO:_fblas.drotmg",\ | |||
| 1051 | capi_kwlist,&d1_capi,&d2_capi,&x1_capi,&y1_capi)) | |||
| 1052 | return NULL((void*)0); | |||
| 1053 | /*frompyobj*/ | |||
| 1054 | /* Processing variable d1 */ | |||
| 1055 | f2py_success = double_from_pyobj(&d1,d1_capi,"_fblas.drotmg() 1st argument (d1) can't be converted to double"); | |||
| 1056 | if (f2py_success) { | |||
| 1057 | /* Processing variable d2 */ | |||
| 1058 | f2py_success = double_from_pyobj(&d2,d2_capi,"_fblas.drotmg() 2nd argument (d2) can't be converted to double"); | |||
| 1059 | if (f2py_success) { | |||
| 1060 | /* Processing variable x1 */ | |||
| 1061 | f2py_success = double_from_pyobj(&x1,x1_capi,"_fblas.drotmg() 3rd argument (x1) can't be converted to double"); | |||
| 1062 | if (f2py_success) { | |||
| 1063 | /* Processing variable y1 */ | |||
| 1064 | f2py_success = double_from_pyobj(&y1,y1_capi,"_fblas.drotmg() 4th argument (y1) can't be converted to double"); | |||
| 1065 | if (f2py_success) { | |||
| 1066 | /* Processing variable param */ | |||
| 1067 | param_Dims[0]=5; | |||
| 1068 | capi_param_intent |= F2PY_INTENT_OUT4|F2PY_INTENT_HIDE8; | |||
| 1069 | capi_param_tmp = array_from_pyobj(NPY_DOUBLE,param_Dims,param_Rank,capi_param_intent,Py_None(&_Py_NoneStruct)); | |||
| 1070 | if (capi_param_tmp == NULL((void*)0)) { | |||
| 1071 | if (!PyErr_Occurred()) | |||
| 1072 | PyErr_SetString(_fblas_error,"failed in converting hidden `param' of _fblas.drotmg to C/Fortran array" ); | |||
| 1073 | } else { | |||
| 1074 | param = (double *)(PyArray_DATA(capi_param_tmp)((void *)((PyArrayObject_fields *)(capi_param_tmp))->data)); | |||
| 1075 | ||||
| 1076 | /*end of frompyobj*/ | |||
| 1077 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1078 | f2py_start_call_clock(); | |||
| 1079 | #endif | |||
| 1080 | /*callfortranroutine*/ | |||
| 1081 | (*f2py_func)(&d1,&d2,&x1,&y1,param) ; | |||
| 1082 | /*(*f2py_func)(&d1,&d2,&x1,&y1,param);*/ | |||
| 1083 | if (PyErr_Occurred()) | |||
| 1084 | f2py_success = 0; | |||
| 1085 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1086 | f2py_stop_call_clock(); | |||
| 1087 | #endif | |||
| 1088 | /*end of callfortranroutine*/ | |||
| 1089 | if (f2py_success) { | |||
| 1090 | /*pyobjfrom*/ | |||
| 1091 | /*end of pyobjfrom*/ | |||
| 1092 | CFUNCSMESS("Building return value.\n"); | |||
| 1093 | capi_buildvalue = Py_BuildValue("N",capi_param_tmp); | |||
| 1094 | /*closepyobjfrom*/ | |||
| 1095 | /*end of closepyobjfrom*/ | |||
| 1096 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 1097 | /*cleanupfrompyobj*/ | |||
| 1098 | } /*if (capi_param_tmp == NULL) ... else of param*/ | |||
| 1099 | /* End of cleaning variable param */ | |||
| 1100 | } /*if (f2py_success) of y1*/ | |||
| 1101 | /* End of cleaning variable y1 */ | |||
| 1102 | } /*if (f2py_success) of x1*/ | |||
| 1103 | /* End of cleaning variable x1 */ | |||
| 1104 | } /*if (f2py_success) of d2*/ | |||
| 1105 | /* End of cleaning variable d2 */ | |||
| 1106 | } /*if (f2py_success) of d1*/ | |||
| 1107 | /* End of cleaning variable d1 */ | |||
| 1108 | /*end of cleanupfrompyobj*/ | |||
| 1109 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 1110 | /*routdebugfailure*/ | |||
| 1111 | } else { | |||
| 1112 | /*routdebugleave*/ | |||
| 1113 | } | |||
| 1114 | CFUNCSMESS("Freeing memory.\n"); | |||
| 1115 | /*freemem*/ | |||
| 1116 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1117 | f2py_stop_clock(); | |||
| 1118 | #endif | |||
| 1119 | return capi_buildvalue; | |||
| 1120 | } | |||
| 1121 | /******************************* end of drotmg *******************************/ | |||
| 1122 | ||||
| 1123 | /************************************ srot ************************************/ | |||
| 1124 | static char doc_f2py_rout__fblas_srot[] = "\ | |||
| 1125 | x,y = srot(x,y,c,s,[n,offx,incx,offy,incy,overwrite_x,overwrite_y])\n\nWrapper for ``srot``.\ | |||
| 1126 | \n\nParameters\n----------\n" | |||
| 1127 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 1128 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 1129 | "c : input float\n" | |||
| 1130 | "s : input float\n" | |||
| 1131 | "\nOther Parameters\n----------------\n" | |||
| 1132 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 1133 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 1134 | "offx : input int, optional\n Default: 0\n" | |||
| 1135 | "incx : input int, optional\n Default: 1\n" | |||
| 1136 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 1137 | "offy : input int, optional\n Default: 0\n" | |||
| 1138 | "incy : input int, optional\n Default: 1\n" | |||
| 1139 | "\nReturns\n-------\n" | |||
| 1140 | "x : rank-1 array('f') with bounds (*)\n" | |||
| 1141 | "y : rank-1 array('f') with bounds (*)"; | |||
| 1142 | /* extern void F_FUNC(srot,SROT)(F_INT*,float*,F_INT*,float*,F_INT*,float*,float* ); */ | |||
| 1143 | static PyObject *f2py_rout__fblas_srot(const PyObject *capi_self, | |||
| 1144 | PyObject *capi_args, | |||
| 1145 | PyObject *capi_keywds, | |||
| 1146 | void (*f2py_func)(F_INTint*,float*,F_INTint*,float*,F_INTint*,float*,float* )) { | |||
| 1147 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 1148 | volatile int f2py_success = 1; | |||
| 1149 | /*decl*/ | |||
| 1150 | ||||
| 1151 | int n = 0; | |||
| 1152 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 1153 | float *x = NULL((void*)0); | |||
| 1154 | npy_intp x_Dims[1] = {-1}; | |||
| 1155 | const int x_Rank = 1; | |||
| 1156 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 1157 | int capi_x_intent = 0; | |||
| 1158 | int capi_overwrite_x = 0; | |||
| 1159 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 1160 | int offx = 0; | |||
| 1161 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 1162 | int incx = 0; | |||
| 1163 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 1164 | float *y = NULL((void*)0); | |||
| 1165 | npy_intp y_Dims[1] = {-1}; | |||
| 1166 | const int y_Rank = 1; | |||
| 1167 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 1168 | int capi_y_intent = 0; | |||
| 1169 | int capi_overwrite_y = 0; | |||
| 1170 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 1171 | int offy = 0; | |||
| 1172 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 1173 | int incy = 0; | |||
| 1174 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 1175 | float c = 0; | |||
| 1176 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 1177 | float s = 0; | |||
| 1178 | PyObject *s_capi = Py_None(&_Py_NoneStruct); | |||
| 1179 | static char *capi_kwlist[] = {"x","y","c","s","n","offx","incx","offy","incy","overwrite_x","overwrite_y",NULL((void*)0)}; | |||
| 1180 | ||||
| 1181 | /*routdebugenter*/ | |||
| 1182 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1183 | f2py_start_clock(); | |||
| 1184 | #endif | |||
| 1185 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 1186 | "OOOO|OOOOOii:_fblas.srot",\ | |||
| 1187 | capi_kwlist,&x_capi,&y_capi,&c_capi,&s_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&capi_overwrite_x,&capi_overwrite_y)) | |||
| 1188 | return NULL((void*)0); | |||
| 1189 | /*frompyobj*/ | |||
| 1190 | /* Processing variable x */ | |||
| 1191 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 1192 | ; | |||
| 1193 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1194 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 1195 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 1196 | if (!PyErr_Occurred()) | |||
| 1197 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.srot to C/Fortran array" ); | |||
| 1198 | } else { | |||
| 1199 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 1200 | ||||
| 1201 | /* Processing variable y */ | |||
| 1202 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 1203 | ; | |||
| 1204 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1205 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 1206 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 1207 | if (!PyErr_Occurred()) | |||
| 1208 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.srot to C/Fortran array" ); | |||
| 1209 | } else { | |||
| 1210 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 1211 | ||||
| 1212 | /* Processing variable c */ | |||
| 1213 | f2py_success = float_from_pyobj(&c,c_capi,"_fblas.srot() 3rd argument (c) can't be converted to float"); | |||
| 1214 | if (f2py_success) { | |||
| 1215 | /* Processing variable s */ | |||
| 1216 | f2py_success = float_from_pyobj(&s,s_capi,"_fblas.srot() 4th argument (s) can't be converted to float"); | |||
| 1217 | if (f2py_success) { | |||
| 1218 | /* Processing variable incx */ | |||
| 1219 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 1220 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.srot() 3rd keyword (incx) can't be converted to int"); | |||
| 1221 | if (f2py_success) { | |||
| 1222 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","srot:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""srot:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1223 | /* Processing variable incy */ | |||
| 1224 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 1225 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.srot() 5th keyword (incy) can't be converted to int"); | |||
| 1226 | if (f2py_success) { | |||
| 1227 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","srot:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""srot:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1228 | /* Processing variable offx */ | |||
| 1229 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 1230 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.srot() 2nd keyword (offx) can't be converted to int"); | |||
| 1231 | if (f2py_success) { | |||
| 1232 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","srot:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srot:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1233 | /* Processing variable offy */ | |||
| 1234 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 1235 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.srot() 4th keyword (offy) can't be converted to int"); | |||
| 1236 | if (f2py_success) { | |||
| 1237 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","srot:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srot:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1238 | /* Processing variable n */ | |||
| 1239 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 1240 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.srot() 1st keyword (n) can't be converted to int"); | |||
| 1241 | if (f2py_success) { | |||
| 1242 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","srot:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srot:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1243 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","srot:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srot:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1244 | /*end of frompyobj*/ | |||
| 1245 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1246 | f2py_start_call_clock(); | |||
| 1247 | #endif | |||
| 1248 | /*callfortranroutine*/ | |||
| 1249 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy,&c,&s) ; | |||
| 1250 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy,&c,&s);*/ | |||
| 1251 | if (PyErr_Occurred()) | |||
| 1252 | f2py_success = 0; | |||
| 1253 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1254 | f2py_stop_call_clock(); | |||
| 1255 | #endif | |||
| 1256 | /*end of callfortranroutine*/ | |||
| 1257 | if (f2py_success) { | |||
| 1258 | /*pyobjfrom*/ | |||
| 1259 | /*end of pyobjfrom*/ | |||
| 1260 | CFUNCSMESS("Building return value.\n"); | |||
| 1261 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 1262 | /*closepyobjfrom*/ | |||
| 1263 | /*end of closepyobjfrom*/ | |||
| 1264 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 1265 | /*cleanupfrompyobj*/ | |||
| 1266 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 1267 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 1268 | } /*if (f2py_success) of n*/ | |||
| 1269 | /* End of cleaning variable n */ | |||
| 1270 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 1271 | } /*if (f2py_success) of offy*/ | |||
| 1272 | /* End of cleaning variable offy */ | |||
| 1273 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 1274 | } /*if (f2py_success) of offx*/ | |||
| 1275 | /* End of cleaning variable offx */ | |||
| 1276 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 1277 | } /*if (f2py_success) of incy*/ | |||
| 1278 | /* End of cleaning variable incy */ | |||
| 1279 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 1280 | } /*if (f2py_success) of incx*/ | |||
| 1281 | /* End of cleaning variable incx */ | |||
| 1282 | } /*if (f2py_success) of s*/ | |||
| 1283 | /* End of cleaning variable s */ | |||
| 1284 | } /*if (f2py_success) of c*/ | |||
| 1285 | /* End of cleaning variable c */ | |||
| 1286 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 1287 | /* End of cleaning variable y */ | |||
| 1288 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 1289 | /* End of cleaning variable x */ | |||
| 1290 | /*end of cleanupfrompyobj*/ | |||
| 1291 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 1292 | /*routdebugfailure*/ | |||
| 1293 | } else { | |||
| 1294 | /*routdebugleave*/ | |||
| 1295 | } | |||
| 1296 | CFUNCSMESS("Freeing memory.\n"); | |||
| 1297 | /*freemem*/ | |||
| 1298 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1299 | f2py_stop_clock(); | |||
| 1300 | #endif | |||
| 1301 | return capi_buildvalue; | |||
| 1302 | } | |||
| 1303 | /******************************** end of srot ********************************/ | |||
| 1304 | ||||
| 1305 | /************************************ drot ************************************/ | |||
| 1306 | static char doc_f2py_rout__fblas_drot[] = "\ | |||
| 1307 | x,y = drot(x,y,c,s,[n,offx,incx,offy,incy,overwrite_x,overwrite_y])\n\nWrapper for ``drot``.\ | |||
| 1308 | \n\nParameters\n----------\n" | |||
| 1309 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 1310 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 1311 | "c : input float\n" | |||
| 1312 | "s : input float\n" | |||
| 1313 | "\nOther Parameters\n----------------\n" | |||
| 1314 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 1315 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 1316 | "offx : input int, optional\n Default: 0\n" | |||
| 1317 | "incx : input int, optional\n Default: 1\n" | |||
| 1318 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 1319 | "offy : input int, optional\n Default: 0\n" | |||
| 1320 | "incy : input int, optional\n Default: 1\n" | |||
| 1321 | "\nReturns\n-------\n" | |||
| 1322 | "x : rank-1 array('d') with bounds (*)\n" | |||
| 1323 | "y : rank-1 array('d') with bounds (*)"; | |||
| 1324 | /* extern void F_FUNC(drot,DROT)(F_INT*,double*,F_INT*,double*,F_INT*,double*,double* ); */ | |||
| 1325 | static PyObject *f2py_rout__fblas_drot(const PyObject *capi_self, | |||
| 1326 | PyObject *capi_args, | |||
| 1327 | PyObject *capi_keywds, | |||
| 1328 | void (*f2py_func)(F_INTint*,double*,F_INTint*,double*,F_INTint*,double*,double* )) { | |||
| 1329 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 1330 | volatile int f2py_success = 1; | |||
| 1331 | /*decl*/ | |||
| 1332 | ||||
| 1333 | int n = 0; | |||
| 1334 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 1335 | double *x = NULL((void*)0); | |||
| 1336 | npy_intp x_Dims[1] = {-1}; | |||
| 1337 | const int x_Rank = 1; | |||
| 1338 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 1339 | int capi_x_intent = 0; | |||
| 1340 | int capi_overwrite_x = 0; | |||
| 1341 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 1342 | int offx = 0; | |||
| 1343 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 1344 | int incx = 0; | |||
| 1345 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 1346 | double *y = NULL((void*)0); | |||
| 1347 | npy_intp y_Dims[1] = {-1}; | |||
| 1348 | const int y_Rank = 1; | |||
| 1349 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 1350 | int capi_y_intent = 0; | |||
| 1351 | int capi_overwrite_y = 0; | |||
| 1352 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 1353 | int offy = 0; | |||
| 1354 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 1355 | int incy = 0; | |||
| 1356 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 1357 | double c = 0; | |||
| 1358 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 1359 | double s = 0; | |||
| 1360 | PyObject *s_capi = Py_None(&_Py_NoneStruct); | |||
| 1361 | static char *capi_kwlist[] = {"x","y","c","s","n","offx","incx","offy","incy","overwrite_x","overwrite_y",NULL((void*)0)}; | |||
| 1362 | ||||
| 1363 | /*routdebugenter*/ | |||
| 1364 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1365 | f2py_start_clock(); | |||
| 1366 | #endif | |||
| 1367 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 1368 | "OOOO|OOOOOii:_fblas.drot",\ | |||
| 1369 | capi_kwlist,&x_capi,&y_capi,&c_capi,&s_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&capi_overwrite_x,&capi_overwrite_y)) | |||
| 1370 | return NULL((void*)0); | |||
| 1371 | /*frompyobj*/ | |||
| 1372 | /* Processing variable x */ | |||
| 1373 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 1374 | ; | |||
| 1375 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1376 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 1377 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 1378 | if (!PyErr_Occurred()) | |||
| 1379 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.drot to C/Fortran array" ); | |||
| 1380 | } else { | |||
| 1381 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 1382 | ||||
| 1383 | /* Processing variable y */ | |||
| 1384 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 1385 | ; | |||
| 1386 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1387 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 1388 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 1389 | if (!PyErr_Occurred()) | |||
| 1390 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.drot to C/Fortran array" ); | |||
| 1391 | } else { | |||
| 1392 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 1393 | ||||
| 1394 | /* Processing variable c */ | |||
| 1395 | f2py_success = double_from_pyobj(&c,c_capi,"_fblas.drot() 3rd argument (c) can't be converted to double"); | |||
| 1396 | if (f2py_success) { | |||
| 1397 | /* Processing variable s */ | |||
| 1398 | f2py_success = double_from_pyobj(&s,s_capi,"_fblas.drot() 4th argument (s) can't be converted to double"); | |||
| 1399 | if (f2py_success) { | |||
| 1400 | /* Processing variable incx */ | |||
| 1401 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 1402 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.drot() 3rd keyword (incx) can't be converted to int"); | |||
| 1403 | if (f2py_success) { | |||
| 1404 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","drot:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""drot:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1405 | /* Processing variable incy */ | |||
| 1406 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 1407 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.drot() 5th keyword (incy) can't be converted to int"); | |||
| 1408 | if (f2py_success) { | |||
| 1409 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","drot:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""drot:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1410 | /* Processing variable offx */ | |||
| 1411 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 1412 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.drot() 2nd keyword (offx) can't be converted to int"); | |||
| 1413 | if (f2py_success) { | |||
| 1414 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","drot:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drot:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1415 | /* Processing variable offy */ | |||
| 1416 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 1417 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.drot() 4th keyword (offy) can't be converted to int"); | |||
| 1418 | if (f2py_success) { | |||
| 1419 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","drot:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drot:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1420 | /* Processing variable n */ | |||
| 1421 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 1422 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.drot() 1st keyword (n) can't be converted to int"); | |||
| 1423 | if (f2py_success) { | |||
| 1424 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","drot:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drot:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1425 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","drot:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drot:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1426 | /*end of frompyobj*/ | |||
| 1427 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1428 | f2py_start_call_clock(); | |||
| 1429 | #endif | |||
| 1430 | /*callfortranroutine*/ | |||
| 1431 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy,&c,&s) ; | |||
| 1432 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy,&c,&s);*/ | |||
| 1433 | if (PyErr_Occurred()) | |||
| 1434 | f2py_success = 0; | |||
| 1435 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1436 | f2py_stop_call_clock(); | |||
| 1437 | #endif | |||
| 1438 | /*end of callfortranroutine*/ | |||
| 1439 | if (f2py_success) { | |||
| 1440 | /*pyobjfrom*/ | |||
| 1441 | /*end of pyobjfrom*/ | |||
| 1442 | CFUNCSMESS("Building return value.\n"); | |||
| 1443 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 1444 | /*closepyobjfrom*/ | |||
| 1445 | /*end of closepyobjfrom*/ | |||
| 1446 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 1447 | /*cleanupfrompyobj*/ | |||
| 1448 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 1449 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 1450 | } /*if (f2py_success) of n*/ | |||
| 1451 | /* End of cleaning variable n */ | |||
| 1452 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 1453 | } /*if (f2py_success) of offy*/ | |||
| 1454 | /* End of cleaning variable offy */ | |||
| 1455 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 1456 | } /*if (f2py_success) of offx*/ | |||
| 1457 | /* End of cleaning variable offx */ | |||
| 1458 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 1459 | } /*if (f2py_success) of incy*/ | |||
| 1460 | /* End of cleaning variable incy */ | |||
| 1461 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 1462 | } /*if (f2py_success) of incx*/ | |||
| 1463 | /* End of cleaning variable incx */ | |||
| 1464 | } /*if (f2py_success) of s*/ | |||
| 1465 | /* End of cleaning variable s */ | |||
| 1466 | } /*if (f2py_success) of c*/ | |||
| 1467 | /* End of cleaning variable c */ | |||
| 1468 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 1469 | /* End of cleaning variable y */ | |||
| 1470 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 1471 | /* End of cleaning variable x */ | |||
| 1472 | /*end of cleanupfrompyobj*/ | |||
| 1473 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 1474 | /*routdebugfailure*/ | |||
| 1475 | } else { | |||
| 1476 | /*routdebugleave*/ | |||
| 1477 | } | |||
| 1478 | CFUNCSMESS("Freeing memory.\n"); | |||
| 1479 | /*freemem*/ | |||
| 1480 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1481 | f2py_stop_clock(); | |||
| 1482 | #endif | |||
| 1483 | return capi_buildvalue; | |||
| 1484 | } | |||
| 1485 | /******************************** end of drot ********************************/ | |||
| 1486 | ||||
| 1487 | /*********************************** csrot ***********************************/ | |||
| 1488 | static char doc_f2py_rout__fblas_csrot[] = "\ | |||
| 1489 | x,y = csrot(x,y,c,s,[n,offx,incx,offy,incy,overwrite_x,overwrite_y])\n\nWrapper for ``csrot``.\ | |||
| 1490 | \n\nParameters\n----------\n" | |||
| 1491 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 1492 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 1493 | "c : input float\n" | |||
| 1494 | "s : input float\n" | |||
| 1495 | "\nOther Parameters\n----------------\n" | |||
| 1496 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 1497 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 1498 | "offx : input int, optional\n Default: 0\n" | |||
| 1499 | "incx : input int, optional\n Default: 1\n" | |||
| 1500 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 1501 | "offy : input int, optional\n Default: 0\n" | |||
| 1502 | "incy : input int, optional\n Default: 1\n" | |||
| 1503 | "\nReturns\n-------\n" | |||
| 1504 | "x : rank-1 array('F') with bounds (*)\n" | |||
| 1505 | "y : rank-1 array('F') with bounds (*)"; | |||
| 1506 | /* extern void F_FUNC(csrot,CSROT)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT*,float*,float* ); */ | |||
| 1507 | static PyObject *f2py_rout__fblas_csrot(const PyObject *capi_self, | |||
| 1508 | PyObject *capi_args, | |||
| 1509 | PyObject *capi_keywds, | |||
| 1510 | void (*f2py_func)(F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint*,float*,float* )) { | |||
| 1511 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 1512 | volatile int f2py_success = 1; | |||
| 1513 | /*decl*/ | |||
| 1514 | ||||
| 1515 | int n = 0; | |||
| 1516 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 1517 | complex_float *x = NULL((void*)0); | |||
| 1518 | npy_intp x_Dims[1] = {-1}; | |||
| 1519 | const int x_Rank = 1; | |||
| 1520 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 1521 | int capi_x_intent = 0; | |||
| 1522 | int capi_overwrite_x = 0; | |||
| 1523 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 1524 | int offx = 0; | |||
| 1525 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 1526 | int incx = 0; | |||
| 1527 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 1528 | complex_float *y = NULL((void*)0); | |||
| 1529 | npy_intp y_Dims[1] = {-1}; | |||
| 1530 | const int y_Rank = 1; | |||
| 1531 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 1532 | int capi_y_intent = 0; | |||
| 1533 | int capi_overwrite_y = 0; | |||
| 1534 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 1535 | int offy = 0; | |||
| 1536 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 1537 | int incy = 0; | |||
| 1538 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 1539 | float c = 0; | |||
| 1540 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 1541 | float s = 0; | |||
| 1542 | PyObject *s_capi = Py_None(&_Py_NoneStruct); | |||
| 1543 | static char *capi_kwlist[] = {"x","y","c","s","n","offx","incx","offy","incy","overwrite_x","overwrite_y",NULL((void*)0)}; | |||
| 1544 | ||||
| 1545 | /*routdebugenter*/ | |||
| 1546 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1547 | f2py_start_clock(); | |||
| 1548 | #endif | |||
| 1549 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 1550 | "OOOO|OOOOOii:_fblas.csrot",\ | |||
| 1551 | capi_kwlist,&x_capi,&y_capi,&c_capi,&s_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&capi_overwrite_x,&capi_overwrite_y)) | |||
| 1552 | return NULL((void*)0); | |||
| 1553 | /*frompyobj*/ | |||
| 1554 | /* Processing variable x */ | |||
| 1555 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 1556 | ; | |||
| 1557 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1558 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 1559 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 1560 | if (!PyErr_Occurred()) | |||
| 1561 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.csrot to C/Fortran array" ); | |||
| 1562 | } else { | |||
| 1563 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 1564 | ||||
| 1565 | /* Processing variable y */ | |||
| 1566 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 1567 | ; | |||
| 1568 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1569 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 1570 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 1571 | if (!PyErr_Occurred()) | |||
| 1572 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.csrot to C/Fortran array" ); | |||
| 1573 | } else { | |||
| 1574 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 1575 | ||||
| 1576 | /* Processing variable c */ | |||
| 1577 | f2py_success = float_from_pyobj(&c,c_capi,"_fblas.csrot() 3rd argument (c) can't be converted to float"); | |||
| 1578 | if (f2py_success) { | |||
| 1579 | /* Processing variable s */ | |||
| 1580 | f2py_success = float_from_pyobj(&s,s_capi,"_fblas.csrot() 4th argument (s) can't be converted to float"); | |||
| 1581 | if (f2py_success) { | |||
| 1582 | /* Processing variable incx */ | |||
| 1583 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 1584 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.csrot() 3rd keyword (incx) can't be converted to int"); | |||
| 1585 | if (f2py_success) { | |||
| 1586 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","csrot:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csrot:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1587 | /* Processing variable incy */ | |||
| 1588 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 1589 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.csrot() 5th keyword (incy) can't be converted to int"); | |||
| 1590 | if (f2py_success) { | |||
| 1591 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","csrot:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csrot:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1592 | /* Processing variable offx */ | |||
| 1593 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 1594 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.csrot() 2nd keyword (offx) can't be converted to int"); | |||
| 1595 | if (f2py_success) { | |||
| 1596 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","csrot:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csrot:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1597 | /* Processing variable offy */ | |||
| 1598 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 1599 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.csrot() 4th keyword (offy) can't be converted to int"); | |||
| 1600 | if (f2py_success) { | |||
| 1601 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","csrot:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csrot:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1602 | /* Processing variable n */ | |||
| 1603 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 1604 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.csrot() 1st keyword (n) can't be converted to int"); | |||
| 1605 | if (f2py_success) { | |||
| 1606 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","csrot:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csrot:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1607 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","csrot:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csrot:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1608 | /*end of frompyobj*/ | |||
| 1609 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1610 | f2py_start_call_clock(); | |||
| 1611 | #endif | |||
| 1612 | /*callfortranroutine*/ | |||
| 1613 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy,&c,&s) ; | |||
| 1614 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy,&c,&s);*/ | |||
| 1615 | if (PyErr_Occurred()) | |||
| 1616 | f2py_success = 0; | |||
| 1617 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1618 | f2py_stop_call_clock(); | |||
| 1619 | #endif | |||
| 1620 | /*end of callfortranroutine*/ | |||
| 1621 | if (f2py_success) { | |||
| 1622 | /*pyobjfrom*/ | |||
| 1623 | /*end of pyobjfrom*/ | |||
| 1624 | CFUNCSMESS("Building return value.\n"); | |||
| 1625 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 1626 | /*closepyobjfrom*/ | |||
| 1627 | /*end of closepyobjfrom*/ | |||
| 1628 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 1629 | /*cleanupfrompyobj*/ | |||
| 1630 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 1631 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 1632 | } /*if (f2py_success) of n*/ | |||
| 1633 | /* End of cleaning variable n */ | |||
| 1634 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 1635 | } /*if (f2py_success) of offy*/ | |||
| 1636 | /* End of cleaning variable offy */ | |||
| 1637 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 1638 | } /*if (f2py_success) of offx*/ | |||
| 1639 | /* End of cleaning variable offx */ | |||
| 1640 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 1641 | } /*if (f2py_success) of incy*/ | |||
| 1642 | /* End of cleaning variable incy */ | |||
| 1643 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 1644 | } /*if (f2py_success) of incx*/ | |||
| 1645 | /* End of cleaning variable incx */ | |||
| 1646 | } /*if (f2py_success) of s*/ | |||
| 1647 | /* End of cleaning variable s */ | |||
| 1648 | } /*if (f2py_success) of c*/ | |||
| 1649 | /* End of cleaning variable c */ | |||
| 1650 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 1651 | /* End of cleaning variable y */ | |||
| 1652 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 1653 | /* End of cleaning variable x */ | |||
| 1654 | /*end of cleanupfrompyobj*/ | |||
| 1655 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 1656 | /*routdebugfailure*/ | |||
| 1657 | } else { | |||
| 1658 | /*routdebugleave*/ | |||
| 1659 | } | |||
| 1660 | CFUNCSMESS("Freeing memory.\n"); | |||
| 1661 | /*freemem*/ | |||
| 1662 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1663 | f2py_stop_clock(); | |||
| 1664 | #endif | |||
| 1665 | return capi_buildvalue; | |||
| 1666 | } | |||
| 1667 | /******************************** end of csrot ********************************/ | |||
| 1668 | ||||
| 1669 | /*********************************** zdrot ***********************************/ | |||
| 1670 | static char doc_f2py_rout__fblas_zdrot[] = "\ | |||
| 1671 | x,y = zdrot(x,y,c,s,[n,offx,incx,offy,incy,overwrite_x,overwrite_y])\n\nWrapper for ``zdrot``.\ | |||
| 1672 | \n\nParameters\n----------\n" | |||
| 1673 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 1674 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 1675 | "c : input float\n" | |||
| 1676 | "s : input float\n" | |||
| 1677 | "\nOther Parameters\n----------------\n" | |||
| 1678 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 1679 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 1680 | "offx : input int, optional\n Default: 0\n" | |||
| 1681 | "incx : input int, optional\n Default: 1\n" | |||
| 1682 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 1683 | "offy : input int, optional\n Default: 0\n" | |||
| 1684 | "incy : input int, optional\n Default: 1\n" | |||
| 1685 | "\nReturns\n-------\n" | |||
| 1686 | "x : rank-1 array('D') with bounds (*)\n" | |||
| 1687 | "y : rank-1 array('D') with bounds (*)"; | |||
| 1688 | /* extern void F_FUNC(zdrot,ZDROT)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT*,double*,double* ); */ | |||
| 1689 | static PyObject *f2py_rout__fblas_zdrot(const PyObject *capi_self, | |||
| 1690 | PyObject *capi_args, | |||
| 1691 | PyObject *capi_keywds, | |||
| 1692 | void (*f2py_func)(F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint*,double*,double* )) { | |||
| 1693 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 1694 | volatile int f2py_success = 1; | |||
| 1695 | /*decl*/ | |||
| 1696 | ||||
| 1697 | int n = 0; | |||
| 1698 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 1699 | complex_double *x = NULL((void*)0); | |||
| 1700 | npy_intp x_Dims[1] = {-1}; | |||
| 1701 | const int x_Rank = 1; | |||
| 1702 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 1703 | int capi_x_intent = 0; | |||
| 1704 | int capi_overwrite_x = 0; | |||
| 1705 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 1706 | int offx = 0; | |||
| 1707 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 1708 | int incx = 0; | |||
| 1709 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 1710 | complex_double *y = NULL((void*)0); | |||
| 1711 | npy_intp y_Dims[1] = {-1}; | |||
| 1712 | const int y_Rank = 1; | |||
| 1713 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 1714 | int capi_y_intent = 0; | |||
| 1715 | int capi_overwrite_y = 0; | |||
| 1716 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 1717 | int offy = 0; | |||
| 1718 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 1719 | int incy = 0; | |||
| 1720 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 1721 | double c = 0; | |||
| 1722 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 1723 | double s = 0; | |||
| 1724 | PyObject *s_capi = Py_None(&_Py_NoneStruct); | |||
| 1725 | static char *capi_kwlist[] = {"x","y","c","s","n","offx","incx","offy","incy","overwrite_x","overwrite_y",NULL((void*)0)}; | |||
| 1726 | ||||
| 1727 | /*routdebugenter*/ | |||
| 1728 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1729 | f2py_start_clock(); | |||
| 1730 | #endif | |||
| 1731 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 1732 | "OOOO|OOOOOii:_fblas.zdrot",\ | |||
| 1733 | capi_kwlist,&x_capi,&y_capi,&c_capi,&s_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&capi_overwrite_x,&capi_overwrite_y)) | |||
| 1734 | return NULL((void*)0); | |||
| 1735 | /*frompyobj*/ | |||
| 1736 | /* Processing variable x */ | |||
| 1737 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 1738 | ; | |||
| 1739 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1740 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 1741 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 1742 | if (!PyErr_Occurred()) | |||
| 1743 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.zdrot to C/Fortran array" ); | |||
| 1744 | } else { | |||
| 1745 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 1746 | ||||
| 1747 | /* Processing variable y */ | |||
| 1748 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 1749 | ; | |||
| 1750 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1751 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 1752 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 1753 | if (!PyErr_Occurred()) | |||
| 1754 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.zdrot to C/Fortran array" ); | |||
| 1755 | } else { | |||
| 1756 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 1757 | ||||
| 1758 | /* Processing variable c */ | |||
| 1759 | f2py_success = double_from_pyobj(&c,c_capi,"_fblas.zdrot() 3rd argument (c) can't be converted to double"); | |||
| 1760 | if (f2py_success) { | |||
| 1761 | /* Processing variable s */ | |||
| 1762 | f2py_success = double_from_pyobj(&s,s_capi,"_fblas.zdrot() 4th argument (s) can't be converted to double"); | |||
| 1763 | if (f2py_success) { | |||
| 1764 | /* Processing variable incx */ | |||
| 1765 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 1766 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zdrot() 3rd keyword (incx) can't be converted to int"); | |||
| 1767 | if (f2py_success) { | |||
| 1768 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zdrot:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdrot:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1769 | /* Processing variable incy */ | |||
| 1770 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 1771 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zdrot() 5th keyword (incy) can't be converted to int"); | |||
| 1772 | if (f2py_success) { | |||
| 1773 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zdrot:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdrot:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1774 | /* Processing variable offx */ | |||
| 1775 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 1776 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zdrot() 2nd keyword (offx) can't be converted to int"); | |||
| 1777 | if (f2py_success) { | |||
| 1778 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zdrot:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdrot:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1779 | /* Processing variable offy */ | |||
| 1780 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 1781 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zdrot() 4th keyword (offy) can't be converted to int"); | |||
| 1782 | if (f2py_success) { | |||
| 1783 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","zdrot:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdrot:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1784 | /* Processing variable n */ | |||
| 1785 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 1786 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zdrot() 1st keyword (n) can't be converted to int"); | |||
| 1787 | if (f2py_success) { | |||
| 1788 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","zdrot:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdrot:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1789 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zdrot:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdrot:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1790 | /*end of frompyobj*/ | |||
| 1791 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1792 | f2py_start_call_clock(); | |||
| 1793 | #endif | |||
| 1794 | /*callfortranroutine*/ | |||
| 1795 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy,&c,&s) ; | |||
| 1796 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy,&c,&s);*/ | |||
| 1797 | if (PyErr_Occurred()) | |||
| 1798 | f2py_success = 0; | |||
| 1799 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1800 | f2py_stop_call_clock(); | |||
| 1801 | #endif | |||
| 1802 | /*end of callfortranroutine*/ | |||
| 1803 | if (f2py_success) { | |||
| 1804 | /*pyobjfrom*/ | |||
| 1805 | /*end of pyobjfrom*/ | |||
| 1806 | CFUNCSMESS("Building return value.\n"); | |||
| 1807 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 1808 | /*closepyobjfrom*/ | |||
| 1809 | /*end of closepyobjfrom*/ | |||
| 1810 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 1811 | /*cleanupfrompyobj*/ | |||
| 1812 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 1813 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 1814 | } /*if (f2py_success) of n*/ | |||
| 1815 | /* End of cleaning variable n */ | |||
| 1816 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 1817 | } /*if (f2py_success) of offy*/ | |||
| 1818 | /* End of cleaning variable offy */ | |||
| 1819 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 1820 | } /*if (f2py_success) of offx*/ | |||
| 1821 | /* End of cleaning variable offx */ | |||
| 1822 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 1823 | } /*if (f2py_success) of incy*/ | |||
| 1824 | /* End of cleaning variable incy */ | |||
| 1825 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 1826 | } /*if (f2py_success) of incx*/ | |||
| 1827 | /* End of cleaning variable incx */ | |||
| 1828 | } /*if (f2py_success) of s*/ | |||
| 1829 | /* End of cleaning variable s */ | |||
| 1830 | } /*if (f2py_success) of c*/ | |||
| 1831 | /* End of cleaning variable c */ | |||
| 1832 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 1833 | /* End of cleaning variable y */ | |||
| 1834 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 1835 | /* End of cleaning variable x */ | |||
| 1836 | /*end of cleanupfrompyobj*/ | |||
| 1837 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 1838 | /*routdebugfailure*/ | |||
| 1839 | } else { | |||
| 1840 | /*routdebugleave*/ | |||
| 1841 | } | |||
| 1842 | CFUNCSMESS("Freeing memory.\n"); | |||
| 1843 | /*freemem*/ | |||
| 1844 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1845 | f2py_stop_clock(); | |||
| 1846 | #endif | |||
| 1847 | return capi_buildvalue; | |||
| 1848 | } | |||
| 1849 | /******************************** end of zdrot ********************************/ | |||
| 1850 | ||||
| 1851 | /*********************************** srotm ***********************************/ | |||
| 1852 | static char doc_f2py_rout__fblas_srotm[] = "\ | |||
| 1853 | x,y = srotm(x,y,param,[n,offx,incx,offy,incy,overwrite_x,overwrite_y])\n\nWrapper for ``srotm``.\ | |||
| 1854 | \n\nParameters\n----------\n" | |||
| 1855 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 1856 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 1857 | "param : input rank-1 array('f') with bounds (5)\n" | |||
| 1858 | "\nOther Parameters\n----------------\n" | |||
| 1859 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 1860 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 1861 | "offx : input int, optional\n Default: 0\n" | |||
| 1862 | "incx : input int, optional\n Default: 1\n" | |||
| 1863 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 1864 | "offy : input int, optional\n Default: 0\n" | |||
| 1865 | "incy : input int, optional\n Default: 1\n" | |||
| 1866 | "\nReturns\n-------\n" | |||
| 1867 | "x : rank-1 array('f') with bounds (*)\n" | |||
| 1868 | "y : rank-1 array('f') with bounds (*)"; | |||
| 1869 | /* extern void F_FUNC(srotm,SROTM)(F_INT*,float*,F_INT*,float*,F_INT*,float* ); */ | |||
| 1870 | static PyObject *f2py_rout__fblas_srotm(const PyObject *capi_self, | |||
| 1871 | PyObject *capi_args, | |||
| 1872 | PyObject *capi_keywds, | |||
| 1873 | void (*f2py_func)(F_INTint*,float*,F_INTint*,float*,F_INTint*,float* )) { | |||
| 1874 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 1875 | volatile int f2py_success = 1; | |||
| 1876 | /*decl*/ | |||
| 1877 | ||||
| 1878 | int n = 0; | |||
| 1879 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 1880 | float *x = NULL((void*)0); | |||
| 1881 | npy_intp x_Dims[1] = {-1}; | |||
| 1882 | const int x_Rank = 1; | |||
| 1883 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 1884 | int capi_x_intent = 0; | |||
| 1885 | int capi_overwrite_x = 0; | |||
| 1886 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 1887 | int offx = 0; | |||
| 1888 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 1889 | int incx = 0; | |||
| 1890 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 1891 | float *y = NULL((void*)0); | |||
| 1892 | npy_intp y_Dims[1] = {-1}; | |||
| 1893 | const int y_Rank = 1; | |||
| 1894 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 1895 | int capi_y_intent = 0; | |||
| 1896 | int capi_overwrite_y = 0; | |||
| 1897 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 1898 | int offy = 0; | |||
| 1899 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 1900 | int incy = 0; | |||
| 1901 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 1902 | float *param = NULL((void*)0); | |||
| 1903 | npy_intp param_Dims[1] = {-1}; | |||
| 1904 | const int param_Rank = 1; | |||
| 1905 | PyArrayObject *capi_param_tmp = NULL((void*)0); | |||
| 1906 | int capi_param_intent = 0; | |||
| 1907 | PyObject *param_capi = Py_None(&_Py_NoneStruct); | |||
| 1908 | static char *capi_kwlist[] = {"x","y","param","n","offx","incx","offy","incy","overwrite_x","overwrite_y",NULL((void*)0)}; | |||
| 1909 | ||||
| 1910 | /*routdebugenter*/ | |||
| 1911 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1912 | f2py_start_clock(); | |||
| 1913 | #endif | |||
| 1914 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 1915 | "OOO|OOOOOii:_fblas.srotm",\ | |||
| 1916 | capi_kwlist,&x_capi,&y_capi,¶m_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&capi_overwrite_x,&capi_overwrite_y)) | |||
| 1917 | return NULL((void*)0); | |||
| 1918 | /*frompyobj*/ | |||
| 1919 | /* Processing variable x */ | |||
| 1920 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 1921 | ; | |||
| 1922 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1923 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 1924 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 1925 | if (!PyErr_Occurred()) | |||
| 1926 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.srotm to C/Fortran array" ); | |||
| 1927 | } else { | |||
| 1928 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 1929 | ||||
| 1930 | /* Processing variable y */ | |||
| 1931 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 1932 | ; | |||
| 1933 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 1934 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 1935 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 1936 | if (!PyErr_Occurred()) | |||
| 1937 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.srotm to C/Fortran array" ); | |||
| 1938 | } else { | |||
| 1939 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 1940 | ||||
| 1941 | /* Processing variable param */ | |||
| 1942 | param_Dims[0]=5; | |||
| 1943 | capi_param_intent |= F2PY_INTENT_IN1; | |||
| 1944 | capi_param_tmp = array_from_pyobj(NPY_FLOAT,param_Dims,param_Rank,capi_param_intent,param_capi); | |||
| 1945 | if (capi_param_tmp == NULL((void*)0)) { | |||
| 1946 | if (!PyErr_Occurred()) | |||
| 1947 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `param' of _fblas.srotm to C/Fortran array" ); | |||
| 1948 | } else { | |||
| 1949 | param = (float *)(PyArray_DATA(capi_param_tmp)((void *)((PyArrayObject_fields *)(capi_param_tmp))->data)); | |||
| 1950 | ||||
| 1951 | /* Processing variable incx */ | |||
| 1952 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 1953 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.srotm() 3rd keyword (incx) can't be converted to int"); | |||
| 1954 | if (f2py_success) { | |||
| 1955 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","srotm:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""srotm:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1956 | /* Processing variable incy */ | |||
| 1957 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 1958 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.srotm() 5th keyword (incy) can't be converted to int"); | |||
| 1959 | if (f2py_success) { | |||
| 1960 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","srotm:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""srotm:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 1961 | /* Processing variable offx */ | |||
| 1962 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 1963 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.srotm() 2nd keyword (offx) can't be converted to int"); | |||
| 1964 | if (f2py_success) { | |||
| 1965 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","srotm:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srotm:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1966 | /* Processing variable offy */ | |||
| 1967 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 1968 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.srotm() 4th keyword (offy) can't be converted to int"); | |||
| 1969 | if (f2py_success) { | |||
| 1970 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","srotm:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srotm:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1971 | /* Processing variable n */ | |||
| 1972 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 1973 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.srotm() 1st keyword (n) can't be converted to int"); | |||
| 1974 | if (f2py_success) { | |||
| 1975 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","srotm:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srotm:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1976 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","srotm:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""srotm:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 1977 | /*end of frompyobj*/ | |||
| 1978 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1979 | f2py_start_call_clock(); | |||
| 1980 | #endif | |||
| 1981 | /*callfortranroutine*/ | |||
| 1982 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy,param) ; | |||
| 1983 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy,param);*/ | |||
| 1984 | if (PyErr_Occurred()) | |||
| 1985 | f2py_success = 0; | |||
| 1986 | #ifdef F2PY_REPORT_ATEXIT | |||
| 1987 | f2py_stop_call_clock(); | |||
| 1988 | #endif | |||
| 1989 | /*end of callfortranroutine*/ | |||
| 1990 | if (f2py_success) { | |||
| 1991 | /*pyobjfrom*/ | |||
| 1992 | /*end of pyobjfrom*/ | |||
| 1993 | CFUNCSMESS("Building return value.\n"); | |||
| 1994 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 1995 | /*closepyobjfrom*/ | |||
| 1996 | /*end of closepyobjfrom*/ | |||
| 1997 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 1998 | /*cleanupfrompyobj*/ | |||
| 1999 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2000 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 2001 | } /*if (f2py_success) of n*/ | |||
| 2002 | /* End of cleaning variable n */ | |||
| 2003 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 2004 | } /*if (f2py_success) of offy*/ | |||
| 2005 | /* End of cleaning variable offy */ | |||
| 2006 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2007 | } /*if (f2py_success) of offx*/ | |||
| 2008 | /* End of cleaning variable offx */ | |||
| 2009 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 2010 | } /*if (f2py_success) of incy*/ | |||
| 2011 | /* End of cleaning variable incy */ | |||
| 2012 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2013 | } /*if (f2py_success) of incx*/ | |||
| 2014 | /* End of cleaning variable incx */ | |||
| 2015 | if((PyObject *)capi_param_tmp!=param_capi) { | |||
| 2016 | Py_XDECREF(capi_param_tmp)_Py_XDECREF(((PyObject*)(capi_param_tmp))); } | |||
| 2017 | } /*if (capi_param_tmp == NULL) ... else of param*/ | |||
| 2018 | /* End of cleaning variable param */ | |||
| 2019 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 2020 | /* End of cleaning variable y */ | |||
| 2021 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2022 | /* End of cleaning variable x */ | |||
| 2023 | /*end of cleanupfrompyobj*/ | |||
| 2024 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2025 | /*routdebugfailure*/ | |||
| 2026 | } else { | |||
| 2027 | /*routdebugleave*/ | |||
| 2028 | } | |||
| 2029 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2030 | /*freemem*/ | |||
| 2031 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2032 | f2py_stop_clock(); | |||
| 2033 | #endif | |||
| 2034 | return capi_buildvalue; | |||
| 2035 | } | |||
| 2036 | /******************************** end of srotm ********************************/ | |||
| 2037 | ||||
| 2038 | /*********************************** drotm ***********************************/ | |||
| 2039 | static char doc_f2py_rout__fblas_drotm[] = "\ | |||
| 2040 | x,y = drotm(x,y,param,[n,offx,incx,offy,incy,overwrite_x,overwrite_y])\n\nWrapper for ``drotm``.\ | |||
| 2041 | \n\nParameters\n----------\n" | |||
| 2042 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 2043 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 2044 | "param : input rank-1 array('d') with bounds (5)\n" | |||
| 2045 | "\nOther Parameters\n----------------\n" | |||
| 2046 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2047 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 2048 | "offx : input int, optional\n Default: 0\n" | |||
| 2049 | "incx : input int, optional\n Default: 1\n" | |||
| 2050 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 2051 | "offy : input int, optional\n Default: 0\n" | |||
| 2052 | "incy : input int, optional\n Default: 1\n" | |||
| 2053 | "\nReturns\n-------\n" | |||
| 2054 | "x : rank-1 array('d') with bounds (*)\n" | |||
| 2055 | "y : rank-1 array('d') with bounds (*)"; | |||
| 2056 | /* extern void F_FUNC(drotm,DROTM)(F_INT*,double*,F_INT*,double*,F_INT*,double* ); */ | |||
| 2057 | static PyObject *f2py_rout__fblas_drotm(const PyObject *capi_self, | |||
| 2058 | PyObject *capi_args, | |||
| 2059 | PyObject *capi_keywds, | |||
| 2060 | void (*f2py_func)(F_INTint*,double*,F_INTint*,double*,F_INTint*,double* )) { | |||
| 2061 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 2062 | volatile int f2py_success = 1; | |||
| 2063 | /*decl*/ | |||
| 2064 | ||||
| 2065 | int n = 0; | |||
| 2066 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 2067 | double *x = NULL((void*)0); | |||
| 2068 | npy_intp x_Dims[1] = {-1}; | |||
| 2069 | const int x_Rank = 1; | |||
| 2070 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 2071 | int capi_x_intent = 0; | |||
| 2072 | int capi_overwrite_x = 0; | |||
| 2073 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 2074 | int offx = 0; | |||
| 2075 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 2076 | int incx = 0; | |||
| 2077 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 2078 | double *y = NULL((void*)0); | |||
| 2079 | npy_intp y_Dims[1] = {-1}; | |||
| 2080 | const int y_Rank = 1; | |||
| 2081 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 2082 | int capi_y_intent = 0; | |||
| 2083 | int capi_overwrite_y = 0; | |||
| 2084 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 2085 | int offy = 0; | |||
| 2086 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 2087 | int incy = 0; | |||
| 2088 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 2089 | double *param = NULL((void*)0); | |||
| 2090 | npy_intp param_Dims[1] = {-1}; | |||
| 2091 | const int param_Rank = 1; | |||
| 2092 | PyArrayObject *capi_param_tmp = NULL((void*)0); | |||
| 2093 | int capi_param_intent = 0; | |||
| 2094 | PyObject *param_capi = Py_None(&_Py_NoneStruct); | |||
| 2095 | static char *capi_kwlist[] = {"x","y","param","n","offx","incx","offy","incy","overwrite_x","overwrite_y",NULL((void*)0)}; | |||
| 2096 | ||||
| 2097 | /*routdebugenter*/ | |||
| 2098 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2099 | f2py_start_clock(); | |||
| 2100 | #endif | |||
| 2101 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 2102 | "OOO|OOOOOii:_fblas.drotm",\ | |||
| 2103 | capi_kwlist,&x_capi,&y_capi,¶m_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&capi_overwrite_x,&capi_overwrite_y)) | |||
| 2104 | return NULL((void*)0); | |||
| 2105 | /*frompyobj*/ | |||
| 2106 | /* Processing variable x */ | |||
| 2107 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 2108 | ; | |||
| 2109 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2110 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 2111 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 2112 | if (!PyErr_Occurred()) | |||
| 2113 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.drotm to C/Fortran array" ); | |||
| 2114 | } else { | |||
| 2115 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 2116 | ||||
| 2117 | /* Processing variable y */ | |||
| 2118 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 2119 | ; | |||
| 2120 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2121 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 2122 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 2123 | if (!PyErr_Occurred()) | |||
| 2124 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.drotm to C/Fortran array" ); | |||
| 2125 | } else { | |||
| 2126 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 2127 | ||||
| 2128 | /* Processing variable param */ | |||
| 2129 | param_Dims[0]=5; | |||
| 2130 | capi_param_intent |= F2PY_INTENT_IN1; | |||
| 2131 | capi_param_tmp = array_from_pyobj(NPY_DOUBLE,param_Dims,param_Rank,capi_param_intent,param_capi); | |||
| 2132 | if (capi_param_tmp == NULL((void*)0)) { | |||
| 2133 | if (!PyErr_Occurred()) | |||
| 2134 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `param' of _fblas.drotm to C/Fortran array" ); | |||
| 2135 | } else { | |||
| 2136 | param = (double *)(PyArray_DATA(capi_param_tmp)((void *)((PyArrayObject_fields *)(capi_param_tmp))->data)); | |||
| 2137 | ||||
| 2138 | /* Processing variable incx */ | |||
| 2139 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 2140 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.drotm() 3rd keyword (incx) can't be converted to int"); | |||
| 2141 | if (f2py_success) { | |||
| 2142 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","drotm:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""drotm:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2143 | /* Processing variable incy */ | |||
| 2144 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 2145 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.drotm() 5th keyword (incy) can't be converted to int"); | |||
| 2146 | if (f2py_success) { | |||
| 2147 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","drotm:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""drotm:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2148 | /* Processing variable offx */ | |||
| 2149 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 2150 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.drotm() 2nd keyword (offx) can't be converted to int"); | |||
| 2151 | if (f2py_success) { | |||
| 2152 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","drotm:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drotm:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2153 | /* Processing variable offy */ | |||
| 2154 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 2155 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.drotm() 4th keyword (offy) can't be converted to int"); | |||
| 2156 | if (f2py_success) { | |||
| 2157 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","drotm:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drotm:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2158 | /* Processing variable n */ | |||
| 2159 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 2160 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.drotm() 1st keyword (n) can't be converted to int"); | |||
| 2161 | if (f2py_success) { | |||
| 2162 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","drotm:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drotm:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2163 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","drotm:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""drotm:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2164 | /*end of frompyobj*/ | |||
| 2165 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2166 | f2py_start_call_clock(); | |||
| 2167 | #endif | |||
| 2168 | /*callfortranroutine*/ | |||
| 2169 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy,param) ; | |||
| 2170 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy,param);*/ | |||
| 2171 | if (PyErr_Occurred()) | |||
| 2172 | f2py_success = 0; | |||
| 2173 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2174 | f2py_stop_call_clock(); | |||
| 2175 | #endif | |||
| 2176 | /*end of callfortranroutine*/ | |||
| 2177 | if (f2py_success) { | |||
| 2178 | /*pyobjfrom*/ | |||
| 2179 | /*end of pyobjfrom*/ | |||
| 2180 | CFUNCSMESS("Building return value.\n"); | |||
| 2181 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 2182 | /*closepyobjfrom*/ | |||
| 2183 | /*end of closepyobjfrom*/ | |||
| 2184 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 2185 | /*cleanupfrompyobj*/ | |||
| 2186 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2187 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 2188 | } /*if (f2py_success) of n*/ | |||
| 2189 | /* End of cleaning variable n */ | |||
| 2190 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 2191 | } /*if (f2py_success) of offy*/ | |||
| 2192 | /* End of cleaning variable offy */ | |||
| 2193 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2194 | } /*if (f2py_success) of offx*/ | |||
| 2195 | /* End of cleaning variable offx */ | |||
| 2196 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 2197 | } /*if (f2py_success) of incy*/ | |||
| 2198 | /* End of cleaning variable incy */ | |||
| 2199 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2200 | } /*if (f2py_success) of incx*/ | |||
| 2201 | /* End of cleaning variable incx */ | |||
| 2202 | if((PyObject *)capi_param_tmp!=param_capi) { | |||
| 2203 | Py_XDECREF(capi_param_tmp)_Py_XDECREF(((PyObject*)(capi_param_tmp))); } | |||
| 2204 | } /*if (capi_param_tmp == NULL) ... else of param*/ | |||
| 2205 | /* End of cleaning variable param */ | |||
| 2206 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 2207 | /* End of cleaning variable y */ | |||
| 2208 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2209 | /* End of cleaning variable x */ | |||
| 2210 | /*end of cleanupfrompyobj*/ | |||
| 2211 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2212 | /*routdebugfailure*/ | |||
| 2213 | } else { | |||
| 2214 | /*routdebugleave*/ | |||
| 2215 | } | |||
| 2216 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2217 | /*freemem*/ | |||
| 2218 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2219 | f2py_stop_clock(); | |||
| 2220 | #endif | |||
| 2221 | return capi_buildvalue; | |||
| 2222 | } | |||
| 2223 | /******************************** end of drotm ********************************/ | |||
| 2224 | ||||
| 2225 | /*********************************** sswap ***********************************/ | |||
| 2226 | static char doc_f2py_rout__fblas_sswap[] = "\ | |||
| 2227 | x,y = sswap(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``sswap``.\ | |||
| 2228 | \n\nParameters\n----------\n" | |||
| 2229 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 2230 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 2231 | "\nOther Parameters\n----------------\n" | |||
| 2232 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2233 | "offx : input int, optional\n Default: 0\n" | |||
| 2234 | "incx : input int, optional\n Default: 1\n" | |||
| 2235 | "offy : input int, optional\n Default: 0\n" | |||
| 2236 | "incy : input int, optional\n Default: 1\n" | |||
| 2237 | "\nReturns\n-------\n" | |||
| 2238 | "x : rank-1 array('f') with bounds (*)\n" | |||
| 2239 | "y : rank-1 array('f') with bounds (*)"; | |||
| 2240 | /* extern void F_FUNC(sswap,SSWAP)(F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 2241 | static PyObject *f2py_rout__fblas_sswap(const PyObject *capi_self, | |||
| 2242 | PyObject *capi_args, | |||
| 2243 | PyObject *capi_keywds, | |||
| 2244 | void (*f2py_func)(F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 2245 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 2246 | volatile int f2py_success = 1; | |||
| 2247 | /*decl*/ | |||
| 2248 | ||||
| 2249 | int n = 0; | |||
| 2250 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 2251 | float *x = NULL((void*)0); | |||
| 2252 | npy_intp x_Dims[1] = {-1}; | |||
| 2253 | const int x_Rank = 1; | |||
| 2254 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 2255 | int capi_x_intent = 0; | |||
| 2256 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 2257 | int offx = 0; | |||
| 2258 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 2259 | int incx = 0; | |||
| 2260 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 2261 | float *y = NULL((void*)0); | |||
| 2262 | npy_intp y_Dims[1] = {-1}; | |||
| 2263 | const int y_Rank = 1; | |||
| 2264 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 2265 | int capi_y_intent = 0; | |||
| 2266 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 2267 | int offy = 0; | |||
| 2268 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 2269 | int incy = 0; | |||
| 2270 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 2271 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 2272 | ||||
| 2273 | /*routdebugenter*/ | |||
| 2274 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2275 | f2py_start_clock(); | |||
| 2276 | #endif | |||
| 2277 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 2278 | "OO|OOOOO:_fblas.sswap",\ | |||
| 2279 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 2280 | return NULL((void*)0); | |||
| 2281 | /*frompyobj*/ | |||
| 2282 | /* Processing variable x */ | |||
| 2283 | ; | |||
| 2284 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2285 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 2286 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 2287 | if (!PyErr_Occurred()) | |||
| 2288 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.sswap to C/Fortran array" ); | |||
| 2289 | } else { | |||
| 2290 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 2291 | ||||
| 2292 | /* Processing variable y */ | |||
| 2293 | ; | |||
| 2294 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2295 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 2296 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 2297 | if (!PyErr_Occurred()) | |||
| 2298 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.sswap to C/Fortran array" ); | |||
| 2299 | } else { | |||
| 2300 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 2301 | ||||
| 2302 | /* Processing variable incx */ | |||
| 2303 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 2304 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sswap() 3rd keyword (incx) can't be converted to int"); | |||
| 2305 | if (f2py_success) { | |||
| 2306 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","sswap:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sswap:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2307 | /* Processing variable incy */ | |||
| 2308 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 2309 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sswap() 5th keyword (incy) can't be converted to int"); | |||
| 2310 | if (f2py_success) { | |||
| 2311 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","sswap:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sswap:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2312 | /* Processing variable offx */ | |||
| 2313 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 2314 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sswap() 2nd keyword (offx) can't be converted to int"); | |||
| 2315 | if (f2py_success) { | |||
| 2316 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","sswap:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sswap:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2317 | /* Processing variable offy */ | |||
| 2318 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 2319 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.sswap() 4th keyword (offy) can't be converted to int"); | |||
| 2320 | if (f2py_success) { | |||
| 2321 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","sswap:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sswap:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2322 | /* Processing variable n */ | |||
| 2323 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 2324 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sswap() 1st keyword (n) can't be converted to int"); | |||
| 2325 | if (f2py_success) { | |||
| 2326 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","sswap:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sswap:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2327 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","sswap:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sswap:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2328 | /*end of frompyobj*/ | |||
| 2329 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2330 | f2py_start_call_clock(); | |||
| 2331 | #endif | |||
| 2332 | /*callfortranroutine*/ | |||
| 2333 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 2334 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 2335 | if (PyErr_Occurred()) | |||
| 2336 | f2py_success = 0; | |||
| 2337 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2338 | f2py_stop_call_clock(); | |||
| 2339 | #endif | |||
| 2340 | /*end of callfortranroutine*/ | |||
| 2341 | if (f2py_success) { | |||
| 2342 | /*pyobjfrom*/ | |||
| 2343 | /*end of pyobjfrom*/ | |||
| 2344 | CFUNCSMESS("Building return value.\n"); | |||
| 2345 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 2346 | /*closepyobjfrom*/ | |||
| 2347 | /*end of closepyobjfrom*/ | |||
| 2348 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 2349 | /*cleanupfrompyobj*/ | |||
| 2350 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2351 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 2352 | } /*if (f2py_success) of n*/ | |||
| 2353 | /* End of cleaning variable n */ | |||
| 2354 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 2355 | } /*if (f2py_success) of offy*/ | |||
| 2356 | /* End of cleaning variable offy */ | |||
| 2357 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2358 | } /*if (f2py_success) of offx*/ | |||
| 2359 | /* End of cleaning variable offx */ | |||
| 2360 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 2361 | } /*if (f2py_success) of incy*/ | |||
| 2362 | /* End of cleaning variable incy */ | |||
| 2363 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2364 | } /*if (f2py_success) of incx*/ | |||
| 2365 | /* End of cleaning variable incx */ | |||
| 2366 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 2367 | /* End of cleaning variable y */ | |||
| 2368 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2369 | /* End of cleaning variable x */ | |||
| 2370 | /*end of cleanupfrompyobj*/ | |||
| 2371 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2372 | /*routdebugfailure*/ | |||
| 2373 | } else { | |||
| 2374 | /*routdebugleave*/ | |||
| 2375 | } | |||
| 2376 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2377 | /*freemem*/ | |||
| 2378 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2379 | f2py_stop_clock(); | |||
| 2380 | #endif | |||
| 2381 | return capi_buildvalue; | |||
| 2382 | } | |||
| 2383 | /******************************** end of sswap ********************************/ | |||
| 2384 | ||||
| 2385 | /*********************************** dswap ***********************************/ | |||
| 2386 | static char doc_f2py_rout__fblas_dswap[] = "\ | |||
| 2387 | x,y = dswap(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``dswap``.\ | |||
| 2388 | \n\nParameters\n----------\n" | |||
| 2389 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 2390 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 2391 | "\nOther Parameters\n----------------\n" | |||
| 2392 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2393 | "offx : input int, optional\n Default: 0\n" | |||
| 2394 | "incx : input int, optional\n Default: 1\n" | |||
| 2395 | "offy : input int, optional\n Default: 0\n" | |||
| 2396 | "incy : input int, optional\n Default: 1\n" | |||
| 2397 | "\nReturns\n-------\n" | |||
| 2398 | "x : rank-1 array('d') with bounds (*)\n" | |||
| 2399 | "y : rank-1 array('d') with bounds (*)"; | |||
| 2400 | /* extern void F_FUNC(dswap,DSWAP)(F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 2401 | static PyObject *f2py_rout__fblas_dswap(const PyObject *capi_self, | |||
| 2402 | PyObject *capi_args, | |||
| 2403 | PyObject *capi_keywds, | |||
| 2404 | void (*f2py_func)(F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 2405 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 2406 | volatile int f2py_success = 1; | |||
| 2407 | /*decl*/ | |||
| 2408 | ||||
| 2409 | int n = 0; | |||
| 2410 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 2411 | double *x = NULL((void*)0); | |||
| 2412 | npy_intp x_Dims[1] = {-1}; | |||
| 2413 | const int x_Rank = 1; | |||
| 2414 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 2415 | int capi_x_intent = 0; | |||
| 2416 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 2417 | int offx = 0; | |||
| 2418 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 2419 | int incx = 0; | |||
| 2420 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 2421 | double *y = NULL((void*)0); | |||
| 2422 | npy_intp y_Dims[1] = {-1}; | |||
| 2423 | const int y_Rank = 1; | |||
| 2424 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 2425 | int capi_y_intent = 0; | |||
| 2426 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 2427 | int offy = 0; | |||
| 2428 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 2429 | int incy = 0; | |||
| 2430 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 2431 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 2432 | ||||
| 2433 | /*routdebugenter*/ | |||
| 2434 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2435 | f2py_start_clock(); | |||
| 2436 | #endif | |||
| 2437 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 2438 | "OO|OOOOO:_fblas.dswap",\ | |||
| 2439 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 2440 | return NULL((void*)0); | |||
| 2441 | /*frompyobj*/ | |||
| 2442 | /* Processing variable x */ | |||
| 2443 | ; | |||
| 2444 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2445 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 2446 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 2447 | if (!PyErr_Occurred()) | |||
| 2448 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.dswap to C/Fortran array" ); | |||
| 2449 | } else { | |||
| 2450 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 2451 | ||||
| 2452 | /* Processing variable y */ | |||
| 2453 | ; | |||
| 2454 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2455 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 2456 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 2457 | if (!PyErr_Occurred()) | |||
| 2458 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.dswap to C/Fortran array" ); | |||
| 2459 | } else { | |||
| 2460 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 2461 | ||||
| 2462 | /* Processing variable incx */ | |||
| 2463 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 2464 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dswap() 3rd keyword (incx) can't be converted to int"); | |||
| 2465 | if (f2py_success) { | |||
| 2466 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dswap:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dswap:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2467 | /* Processing variable incy */ | |||
| 2468 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 2469 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dswap() 5th keyword (incy) can't be converted to int"); | |||
| 2470 | if (f2py_success) { | |||
| 2471 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","dswap:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dswap:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2472 | /* Processing variable offx */ | |||
| 2473 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 2474 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dswap() 2nd keyword (offx) can't be converted to int"); | |||
| 2475 | if (f2py_success) { | |||
| 2476 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dswap:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dswap:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2477 | /* Processing variable offy */ | |||
| 2478 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 2479 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dswap() 4th keyword (offy) can't be converted to int"); | |||
| 2480 | if (f2py_success) { | |||
| 2481 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","dswap:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dswap:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2482 | /* Processing variable n */ | |||
| 2483 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 2484 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dswap() 1st keyword (n) can't be converted to int"); | |||
| 2485 | if (f2py_success) { | |||
| 2486 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","dswap:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dswap:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2487 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dswap:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dswap:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2488 | /*end of frompyobj*/ | |||
| 2489 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2490 | f2py_start_call_clock(); | |||
| 2491 | #endif | |||
| 2492 | /*callfortranroutine*/ | |||
| 2493 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 2494 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 2495 | if (PyErr_Occurred()) | |||
| 2496 | f2py_success = 0; | |||
| 2497 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2498 | f2py_stop_call_clock(); | |||
| 2499 | #endif | |||
| 2500 | /*end of callfortranroutine*/ | |||
| 2501 | if (f2py_success) { | |||
| 2502 | /*pyobjfrom*/ | |||
| 2503 | /*end of pyobjfrom*/ | |||
| 2504 | CFUNCSMESS("Building return value.\n"); | |||
| 2505 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 2506 | /*closepyobjfrom*/ | |||
| 2507 | /*end of closepyobjfrom*/ | |||
| 2508 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 2509 | /*cleanupfrompyobj*/ | |||
| 2510 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2511 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 2512 | } /*if (f2py_success) of n*/ | |||
| 2513 | /* End of cleaning variable n */ | |||
| 2514 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 2515 | } /*if (f2py_success) of offy*/ | |||
| 2516 | /* End of cleaning variable offy */ | |||
| 2517 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2518 | } /*if (f2py_success) of offx*/ | |||
| 2519 | /* End of cleaning variable offx */ | |||
| 2520 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 2521 | } /*if (f2py_success) of incy*/ | |||
| 2522 | /* End of cleaning variable incy */ | |||
| 2523 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2524 | } /*if (f2py_success) of incx*/ | |||
| 2525 | /* End of cleaning variable incx */ | |||
| 2526 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 2527 | /* End of cleaning variable y */ | |||
| 2528 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2529 | /* End of cleaning variable x */ | |||
| 2530 | /*end of cleanupfrompyobj*/ | |||
| 2531 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2532 | /*routdebugfailure*/ | |||
| 2533 | } else { | |||
| 2534 | /*routdebugleave*/ | |||
| 2535 | } | |||
| 2536 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2537 | /*freemem*/ | |||
| 2538 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2539 | f2py_stop_clock(); | |||
| 2540 | #endif | |||
| 2541 | return capi_buildvalue; | |||
| 2542 | } | |||
| 2543 | /******************************** end of dswap ********************************/ | |||
| 2544 | ||||
| 2545 | /*********************************** cswap ***********************************/ | |||
| 2546 | static char doc_f2py_rout__fblas_cswap[] = "\ | |||
| 2547 | x,y = cswap(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``cswap``.\ | |||
| 2548 | \n\nParameters\n----------\n" | |||
| 2549 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 2550 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 2551 | "\nOther Parameters\n----------------\n" | |||
| 2552 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2553 | "offx : input int, optional\n Default: 0\n" | |||
| 2554 | "incx : input int, optional\n Default: 1\n" | |||
| 2555 | "offy : input int, optional\n Default: 0\n" | |||
| 2556 | "incy : input int, optional\n Default: 1\n" | |||
| 2557 | "\nReturns\n-------\n" | |||
| 2558 | "x : rank-1 array('F') with bounds (*)\n" | |||
| 2559 | "y : rank-1 array('F') with bounds (*)"; | |||
| 2560 | /* extern void F_FUNC(cswap,CSWAP)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 2561 | static PyObject *f2py_rout__fblas_cswap(const PyObject *capi_self, | |||
| 2562 | PyObject *capi_args, | |||
| 2563 | PyObject *capi_keywds, | |||
| 2564 | void (*f2py_func)(F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 2565 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 2566 | volatile int f2py_success = 1; | |||
| 2567 | /*decl*/ | |||
| 2568 | ||||
| 2569 | int n = 0; | |||
| 2570 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 2571 | complex_float *x = NULL((void*)0); | |||
| 2572 | npy_intp x_Dims[1] = {-1}; | |||
| 2573 | const int x_Rank = 1; | |||
| 2574 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 2575 | int capi_x_intent = 0; | |||
| 2576 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 2577 | int offx = 0; | |||
| 2578 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 2579 | int incx = 0; | |||
| 2580 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 2581 | complex_float *y = NULL((void*)0); | |||
| 2582 | npy_intp y_Dims[1] = {-1}; | |||
| 2583 | const int y_Rank = 1; | |||
| 2584 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 2585 | int capi_y_intent = 0; | |||
| 2586 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 2587 | int offy = 0; | |||
| 2588 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 2589 | int incy = 0; | |||
| 2590 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 2591 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 2592 | ||||
| 2593 | /*routdebugenter*/ | |||
| 2594 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2595 | f2py_start_clock(); | |||
| 2596 | #endif | |||
| 2597 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 2598 | "OO|OOOOO:_fblas.cswap",\ | |||
| 2599 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 2600 | return NULL((void*)0); | |||
| 2601 | /*frompyobj*/ | |||
| 2602 | /* Processing variable x */ | |||
| 2603 | ; | |||
| 2604 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2605 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 2606 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 2607 | if (!PyErr_Occurred()) | |||
| 2608 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.cswap to C/Fortran array" ); | |||
| 2609 | } else { | |||
| 2610 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 2611 | ||||
| 2612 | /* Processing variable y */ | |||
| 2613 | ; | |||
| 2614 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2615 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 2616 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 2617 | if (!PyErr_Occurred()) | |||
| 2618 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.cswap to C/Fortran array" ); | |||
| 2619 | } else { | |||
| 2620 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 2621 | ||||
| 2622 | /* Processing variable incx */ | |||
| 2623 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 2624 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cswap() 3rd keyword (incx) can't be converted to int"); | |||
| 2625 | if (f2py_success) { | |||
| 2626 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","cswap:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cswap:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2627 | /* Processing variable incy */ | |||
| 2628 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 2629 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cswap() 5th keyword (incy) can't be converted to int"); | |||
| 2630 | if (f2py_success) { | |||
| 2631 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","cswap:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cswap:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2632 | /* Processing variable offx */ | |||
| 2633 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 2634 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cswap() 2nd keyword (offx) can't be converted to int"); | |||
| 2635 | if (f2py_success) { | |||
| 2636 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","cswap:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cswap:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2637 | /* Processing variable offy */ | |||
| 2638 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 2639 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cswap() 4th keyword (offy) can't be converted to int"); | |||
| 2640 | if (f2py_success) { | |||
| 2641 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","cswap:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cswap:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2642 | /* Processing variable n */ | |||
| 2643 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 2644 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cswap() 1st keyword (n) can't be converted to int"); | |||
| 2645 | if (f2py_success) { | |||
| 2646 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","cswap:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cswap:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2647 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","cswap:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cswap:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2648 | /*end of frompyobj*/ | |||
| 2649 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2650 | f2py_start_call_clock(); | |||
| 2651 | #endif | |||
| 2652 | /*callfortranroutine*/ | |||
| 2653 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 2654 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 2655 | if (PyErr_Occurred()) | |||
| 2656 | f2py_success = 0; | |||
| 2657 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2658 | f2py_stop_call_clock(); | |||
| 2659 | #endif | |||
| 2660 | /*end of callfortranroutine*/ | |||
| 2661 | if (f2py_success) { | |||
| 2662 | /*pyobjfrom*/ | |||
| 2663 | /*end of pyobjfrom*/ | |||
| 2664 | CFUNCSMESS("Building return value.\n"); | |||
| 2665 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 2666 | /*closepyobjfrom*/ | |||
| 2667 | /*end of closepyobjfrom*/ | |||
| 2668 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 2669 | /*cleanupfrompyobj*/ | |||
| 2670 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2671 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 2672 | } /*if (f2py_success) of n*/ | |||
| 2673 | /* End of cleaning variable n */ | |||
| 2674 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 2675 | } /*if (f2py_success) of offy*/ | |||
| 2676 | /* End of cleaning variable offy */ | |||
| 2677 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2678 | } /*if (f2py_success) of offx*/ | |||
| 2679 | /* End of cleaning variable offx */ | |||
| 2680 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 2681 | } /*if (f2py_success) of incy*/ | |||
| 2682 | /* End of cleaning variable incy */ | |||
| 2683 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2684 | } /*if (f2py_success) of incx*/ | |||
| 2685 | /* End of cleaning variable incx */ | |||
| 2686 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 2687 | /* End of cleaning variable y */ | |||
| 2688 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2689 | /* End of cleaning variable x */ | |||
| 2690 | /*end of cleanupfrompyobj*/ | |||
| 2691 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2692 | /*routdebugfailure*/ | |||
| 2693 | } else { | |||
| 2694 | /*routdebugleave*/ | |||
| 2695 | } | |||
| 2696 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2697 | /*freemem*/ | |||
| 2698 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2699 | f2py_stop_clock(); | |||
| 2700 | #endif | |||
| 2701 | return capi_buildvalue; | |||
| 2702 | } | |||
| 2703 | /******************************** end of cswap ********************************/ | |||
| 2704 | ||||
| 2705 | /*********************************** zswap ***********************************/ | |||
| 2706 | static char doc_f2py_rout__fblas_zswap[] = "\ | |||
| 2707 | x,y = zswap(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``zswap``.\ | |||
| 2708 | \n\nParameters\n----------\n" | |||
| 2709 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 2710 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 2711 | "\nOther Parameters\n----------------\n" | |||
| 2712 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2713 | "offx : input int, optional\n Default: 0\n" | |||
| 2714 | "incx : input int, optional\n Default: 1\n" | |||
| 2715 | "offy : input int, optional\n Default: 0\n" | |||
| 2716 | "incy : input int, optional\n Default: 1\n" | |||
| 2717 | "\nReturns\n-------\n" | |||
| 2718 | "x : rank-1 array('D') with bounds (*)\n" | |||
| 2719 | "y : rank-1 array('D') with bounds (*)"; | |||
| 2720 | /* extern void F_FUNC(zswap,ZSWAP)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 2721 | static PyObject *f2py_rout__fblas_zswap(const PyObject *capi_self, | |||
| 2722 | PyObject *capi_args, | |||
| 2723 | PyObject *capi_keywds, | |||
| 2724 | void (*f2py_func)(F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 2725 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 2726 | volatile int f2py_success = 1; | |||
| 2727 | /*decl*/ | |||
| 2728 | ||||
| 2729 | int n = 0; | |||
| 2730 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 2731 | complex_double *x = NULL((void*)0); | |||
| 2732 | npy_intp x_Dims[1] = {-1}; | |||
| 2733 | const int x_Rank = 1; | |||
| 2734 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 2735 | int capi_x_intent = 0; | |||
| 2736 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 2737 | int offx = 0; | |||
| 2738 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 2739 | int incx = 0; | |||
| 2740 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 2741 | complex_double *y = NULL((void*)0); | |||
| 2742 | npy_intp y_Dims[1] = {-1}; | |||
| 2743 | const int y_Rank = 1; | |||
| 2744 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 2745 | int capi_y_intent = 0; | |||
| 2746 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 2747 | int offy = 0; | |||
| 2748 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 2749 | int incy = 0; | |||
| 2750 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 2751 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 2752 | ||||
| 2753 | /*routdebugenter*/ | |||
| 2754 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2755 | f2py_start_clock(); | |||
| 2756 | #endif | |||
| 2757 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 2758 | "OO|OOOOO:_fblas.zswap",\ | |||
| 2759 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 2760 | return NULL((void*)0); | |||
| 2761 | /*frompyobj*/ | |||
| 2762 | /* Processing variable x */ | |||
| 2763 | ; | |||
| 2764 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2765 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 2766 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 2767 | if (!PyErr_Occurred()) | |||
| 2768 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.zswap to C/Fortran array" ); | |||
| 2769 | } else { | |||
| 2770 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 2771 | ||||
| 2772 | /* Processing variable y */ | |||
| 2773 | ; | |||
| 2774 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2775 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 2776 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 2777 | if (!PyErr_Occurred()) | |||
| 2778 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.zswap to C/Fortran array" ); | |||
| 2779 | } else { | |||
| 2780 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 2781 | ||||
| 2782 | /* Processing variable incx */ | |||
| 2783 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 2784 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zswap() 3rd keyword (incx) can't be converted to int"); | |||
| 2785 | if (f2py_success) { | |||
| 2786 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zswap:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zswap:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2787 | /* Processing variable incy */ | |||
| 2788 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 2789 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zswap() 5th keyword (incy) can't be converted to int"); | |||
| 2790 | if (f2py_success) { | |||
| 2791 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zswap:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zswap:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2792 | /* Processing variable offx */ | |||
| 2793 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 2794 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zswap() 2nd keyword (offx) can't be converted to int"); | |||
| 2795 | if (f2py_success) { | |||
| 2796 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zswap:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zswap:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2797 | /* Processing variable offy */ | |||
| 2798 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 2799 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zswap() 4th keyword (offy) can't be converted to int"); | |||
| 2800 | if (f2py_success) { | |||
| 2801 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","zswap:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zswap:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2802 | /* Processing variable n */ | |||
| 2803 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 2804 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zswap() 1st keyword (n) can't be converted to int"); | |||
| 2805 | if (f2py_success) { | |||
| 2806 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","zswap:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zswap:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2807 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zswap:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zswap:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2808 | /*end of frompyobj*/ | |||
| 2809 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2810 | f2py_start_call_clock(); | |||
| 2811 | #endif | |||
| 2812 | /*callfortranroutine*/ | |||
| 2813 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 2814 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 2815 | if (PyErr_Occurred()) | |||
| 2816 | f2py_success = 0; | |||
| 2817 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2818 | f2py_stop_call_clock(); | |||
| 2819 | #endif | |||
| 2820 | /*end of callfortranroutine*/ | |||
| 2821 | if (f2py_success) { | |||
| 2822 | /*pyobjfrom*/ | |||
| 2823 | /*end of pyobjfrom*/ | |||
| 2824 | CFUNCSMESS("Building return value.\n"); | |||
| 2825 | capi_buildvalue = Py_BuildValue("NN",capi_x_tmp,capi_y_tmp); | |||
| 2826 | /*closepyobjfrom*/ | |||
| 2827 | /*end of closepyobjfrom*/ | |||
| 2828 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 2829 | /*cleanupfrompyobj*/ | |||
| 2830 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2831 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 2832 | } /*if (f2py_success) of n*/ | |||
| 2833 | /* End of cleaning variable n */ | |||
| 2834 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 2835 | } /*if (f2py_success) of offy*/ | |||
| 2836 | /* End of cleaning variable offy */ | |||
| 2837 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2838 | } /*if (f2py_success) of offx*/ | |||
| 2839 | /* End of cleaning variable offx */ | |||
| 2840 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 2841 | } /*if (f2py_success) of incy*/ | |||
| 2842 | /* End of cleaning variable incy */ | |||
| 2843 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2844 | } /*if (f2py_success) of incx*/ | |||
| 2845 | /* End of cleaning variable incx */ | |||
| 2846 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 2847 | /* End of cleaning variable y */ | |||
| 2848 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2849 | /* End of cleaning variable x */ | |||
| 2850 | /*end of cleanupfrompyobj*/ | |||
| 2851 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2852 | /*routdebugfailure*/ | |||
| 2853 | } else { | |||
| 2854 | /*routdebugleave*/ | |||
| 2855 | } | |||
| 2856 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2857 | /*freemem*/ | |||
| 2858 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2859 | f2py_stop_clock(); | |||
| 2860 | #endif | |||
| 2861 | return capi_buildvalue; | |||
| 2862 | } | |||
| 2863 | /******************************** end of zswap ********************************/ | |||
| 2864 | ||||
| 2865 | /*********************************** sscal ***********************************/ | |||
| 2866 | static char doc_f2py_rout__fblas_sscal[] = "\ | |||
| 2867 | x = sscal(a,x,[n,offx,incx])\n\nWrapper for ``sscal``.\ | |||
| 2868 | \n\nParameters\n----------\n" | |||
| 2869 | "a : input float\n" | |||
| 2870 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 2871 | "\nOther Parameters\n----------------\n" | |||
| 2872 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2873 | "offx : input int, optional\n Default: 0\n" | |||
| 2874 | "incx : input int, optional\n Default: 1\n" | |||
| 2875 | "\nReturns\n-------\n" | |||
| 2876 | "x : rank-1 array('f') with bounds (*)"; | |||
| 2877 | /* extern void F_FUNC(sscal,SSCAL)(F_INT*,float*,float*,F_INT* ); */ | |||
| 2878 | static PyObject *f2py_rout__fblas_sscal(const PyObject *capi_self, | |||
| 2879 | PyObject *capi_args, | |||
| 2880 | PyObject *capi_keywds, | |||
| 2881 | void (*f2py_func)(F_INTint*,float*,float*,F_INTint* )) { | |||
| 2882 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 2883 | volatile int f2py_success = 1; | |||
| 2884 | /*decl*/ | |||
| 2885 | ||||
| 2886 | int n = 0; | |||
| 2887 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 2888 | float a = 0; | |||
| 2889 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 2890 | float *x = NULL((void*)0); | |||
| 2891 | npy_intp x_Dims[1] = {-1}; | |||
| 2892 | const int x_Rank = 1; | |||
| 2893 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 2894 | int capi_x_intent = 0; | |||
| 2895 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 2896 | int offx = 0; | |||
| 2897 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 2898 | int incx = 0; | |||
| 2899 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 2900 | static char *capi_kwlist[] = {"a","x","n","offx","incx",NULL((void*)0)}; | |||
| 2901 | ||||
| 2902 | /*routdebugenter*/ | |||
| 2903 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2904 | f2py_start_clock(); | |||
| 2905 | #endif | |||
| 2906 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 2907 | "OO|OOO:_fblas.sscal",\ | |||
| 2908 | capi_kwlist,&a_capi,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 2909 | return NULL((void*)0); | |||
| 2910 | /*frompyobj*/ | |||
| 2911 | /* Processing variable a */ | |||
| 2912 | f2py_success = float_from_pyobj(&a,a_capi,"_fblas.sscal() 1st argument (a) can't be converted to float"); | |||
| 2913 | if (f2py_success) { | |||
| 2914 | /* Processing variable x */ | |||
| 2915 | ; | |||
| 2916 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 2917 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 2918 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 2919 | if (!PyErr_Occurred()) | |||
| 2920 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.sscal to C/Fortran array" ); | |||
| 2921 | } else { | |||
| 2922 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 2923 | ||||
| 2924 | /* Processing variable incx */ | |||
| 2925 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 2926 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sscal() 3rd keyword (incx) can't be converted to int"); | |||
| 2927 | if (f2py_success) { | |||
| 2928 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","sscal:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sscal:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 2929 | /* Processing variable offx */ | |||
| 2930 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 2931 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sscal() 2nd keyword (offx) can't be converted to int"); | |||
| 2932 | if (f2py_success) { | |||
| 2933 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","sscal:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sscal:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2934 | /* Processing variable n */ | |||
| 2935 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 2936 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sscal() 1st keyword (n) can't be converted to int"); | |||
| 2937 | if (f2py_success) { | |||
| 2938 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","sscal:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sscal:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 2939 | /*end of frompyobj*/ | |||
| 2940 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2941 | f2py_start_call_clock(); | |||
| 2942 | #endif | |||
| 2943 | /*callfortranroutine*/ | |||
| 2944 | (*f2py_func)(&n,&a,x+offx,&incx) ; | |||
| 2945 | /*(*f2py_func)(&n,&a,x,&offx,&incx);*/ | |||
| 2946 | if (PyErr_Occurred()) | |||
| 2947 | f2py_success = 0; | |||
| 2948 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2949 | f2py_stop_call_clock(); | |||
| 2950 | #endif | |||
| 2951 | /*end of callfortranroutine*/ | |||
| 2952 | if (f2py_success) { | |||
| 2953 | /*pyobjfrom*/ | |||
| 2954 | /*end of pyobjfrom*/ | |||
| 2955 | CFUNCSMESS("Building return value.\n"); | |||
| 2956 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 2957 | /*closepyobjfrom*/ | |||
| 2958 | /*end of closepyobjfrom*/ | |||
| 2959 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 2960 | /*cleanupfrompyobj*/ | |||
| 2961 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 2962 | } /*if (f2py_success) of n*/ | |||
| 2963 | /* End of cleaning variable n */ | |||
| 2964 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 2965 | } /*if (f2py_success) of offx*/ | |||
| 2966 | /* End of cleaning variable offx */ | |||
| 2967 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 2968 | } /*if (f2py_success) of incx*/ | |||
| 2969 | /* End of cleaning variable incx */ | |||
| 2970 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 2971 | /* End of cleaning variable x */ | |||
| 2972 | } /*if (f2py_success) of a*/ | |||
| 2973 | /* End of cleaning variable a */ | |||
| 2974 | /*end of cleanupfrompyobj*/ | |||
| 2975 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 2976 | /*routdebugfailure*/ | |||
| 2977 | } else { | |||
| 2978 | /*routdebugleave*/ | |||
| 2979 | } | |||
| 2980 | CFUNCSMESS("Freeing memory.\n"); | |||
| 2981 | /*freemem*/ | |||
| 2982 | #ifdef F2PY_REPORT_ATEXIT | |||
| 2983 | f2py_stop_clock(); | |||
| 2984 | #endif | |||
| 2985 | return capi_buildvalue; | |||
| 2986 | } | |||
| 2987 | /******************************** end of sscal ********************************/ | |||
| 2988 | ||||
| 2989 | /*********************************** dscal ***********************************/ | |||
| 2990 | static char doc_f2py_rout__fblas_dscal[] = "\ | |||
| 2991 | x = dscal(a,x,[n,offx,incx])\n\nWrapper for ``dscal``.\ | |||
| 2992 | \n\nParameters\n----------\n" | |||
| 2993 | "a : input float\n" | |||
| 2994 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 2995 | "\nOther Parameters\n----------------\n" | |||
| 2996 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 2997 | "offx : input int, optional\n Default: 0\n" | |||
| 2998 | "incx : input int, optional\n Default: 1\n" | |||
| 2999 | "\nReturns\n-------\n" | |||
| 3000 | "x : rank-1 array('d') with bounds (*)"; | |||
| 3001 | /* extern void F_FUNC(dscal,DSCAL)(F_INT*,double*,double*,F_INT* ); */ | |||
| 3002 | static PyObject *f2py_rout__fblas_dscal(const PyObject *capi_self, | |||
| 3003 | PyObject *capi_args, | |||
| 3004 | PyObject *capi_keywds, | |||
| 3005 | void (*f2py_func)(F_INTint*,double*,double*,F_INTint* )) { | |||
| 3006 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3007 | volatile int f2py_success = 1; | |||
| 3008 | /*decl*/ | |||
| 3009 | ||||
| 3010 | int n = 0; | |||
| 3011 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3012 | double a = 0; | |||
| 3013 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 3014 | double *x = NULL((void*)0); | |||
| 3015 | npy_intp x_Dims[1] = {-1}; | |||
| 3016 | const int x_Rank = 1; | |||
| 3017 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3018 | int capi_x_intent = 0; | |||
| 3019 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3020 | int offx = 0; | |||
| 3021 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3022 | int incx = 0; | |||
| 3023 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3024 | static char *capi_kwlist[] = {"a","x","n","offx","incx",NULL((void*)0)}; | |||
| 3025 | ||||
| 3026 | /*routdebugenter*/ | |||
| 3027 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3028 | f2py_start_clock(); | |||
| 3029 | #endif | |||
| 3030 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3031 | "OO|OOO:_fblas.dscal",\ | |||
| 3032 | capi_kwlist,&a_capi,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 3033 | return NULL((void*)0); | |||
| 3034 | /*frompyobj*/ | |||
| 3035 | /* Processing variable a */ | |||
| 3036 | f2py_success = double_from_pyobj(&a,a_capi,"_fblas.dscal() 1st argument (a) can't be converted to double"); | |||
| 3037 | if (f2py_success) { | |||
| 3038 | /* Processing variable x */ | |||
| 3039 | ; | |||
| 3040 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3041 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3042 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3043 | if (!PyErr_Occurred()) | |||
| 3044 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.dscal to C/Fortran array" ); | |||
| 3045 | } else { | |||
| 3046 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3047 | ||||
| 3048 | /* Processing variable incx */ | |||
| 3049 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3050 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dscal() 3rd keyword (incx) can't be converted to int"); | |||
| 3051 | if (f2py_success) { | |||
| 3052 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dscal:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dscal:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3053 | /* Processing variable offx */ | |||
| 3054 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3055 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dscal() 2nd keyword (offx) can't be converted to int"); | |||
| 3056 | if (f2py_success) { | |||
| 3057 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dscal:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dscal:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3058 | /* Processing variable n */ | |||
| 3059 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3060 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dscal() 1st keyword (n) can't be converted to int"); | |||
| 3061 | if (f2py_success) { | |||
| 3062 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dscal:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dscal:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3063 | /*end of frompyobj*/ | |||
| 3064 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3065 | f2py_start_call_clock(); | |||
| 3066 | #endif | |||
| 3067 | /*callfortranroutine*/ | |||
| 3068 | (*f2py_func)(&n,&a,x+offx,&incx) ; | |||
| 3069 | /*(*f2py_func)(&n,&a,x,&offx,&incx);*/ | |||
| 3070 | if (PyErr_Occurred()) | |||
| 3071 | f2py_success = 0; | |||
| 3072 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3073 | f2py_stop_call_clock(); | |||
| 3074 | #endif | |||
| 3075 | /*end of callfortranroutine*/ | |||
| 3076 | if (f2py_success) { | |||
| 3077 | /*pyobjfrom*/ | |||
| 3078 | /*end of pyobjfrom*/ | |||
| 3079 | CFUNCSMESS("Building return value.\n"); | |||
| 3080 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 3081 | /*closepyobjfrom*/ | |||
| 3082 | /*end of closepyobjfrom*/ | |||
| 3083 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3084 | /*cleanupfrompyobj*/ | |||
| 3085 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3086 | } /*if (f2py_success) of n*/ | |||
| 3087 | /* End of cleaning variable n */ | |||
| 3088 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3089 | } /*if (f2py_success) of offx*/ | |||
| 3090 | /* End of cleaning variable offx */ | |||
| 3091 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3092 | } /*if (f2py_success) of incx*/ | |||
| 3093 | /* End of cleaning variable incx */ | |||
| 3094 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3095 | /* End of cleaning variable x */ | |||
| 3096 | } /*if (f2py_success) of a*/ | |||
| 3097 | /* End of cleaning variable a */ | |||
| 3098 | /*end of cleanupfrompyobj*/ | |||
| 3099 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3100 | /*routdebugfailure*/ | |||
| 3101 | } else { | |||
| 3102 | /*routdebugleave*/ | |||
| 3103 | } | |||
| 3104 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3105 | /*freemem*/ | |||
| 3106 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3107 | f2py_stop_clock(); | |||
| 3108 | #endif | |||
| 3109 | return capi_buildvalue; | |||
| 3110 | } | |||
| 3111 | /******************************** end of dscal ********************************/ | |||
| 3112 | ||||
| 3113 | /*********************************** cscal ***********************************/ | |||
| 3114 | static char doc_f2py_rout__fblas_cscal[] = "\ | |||
| 3115 | x = cscal(a,x,[n,offx,incx])\n\nWrapper for ``cscal``.\ | |||
| 3116 | \n\nParameters\n----------\n" | |||
| 3117 | "a : input complex\n" | |||
| 3118 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 3119 | "\nOther Parameters\n----------------\n" | |||
| 3120 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3121 | "offx : input int, optional\n Default: 0\n" | |||
| 3122 | "incx : input int, optional\n Default: 1\n" | |||
| 3123 | "\nReturns\n-------\n" | |||
| 3124 | "x : rank-1 array('F') with bounds (*)"; | |||
| 3125 | /* extern void F_FUNC(cscal,CSCAL)(F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 3126 | static PyObject *f2py_rout__fblas_cscal(const PyObject *capi_self, | |||
| 3127 | PyObject *capi_args, | |||
| 3128 | PyObject *capi_keywds, | |||
| 3129 | void (*f2py_func)(F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 3130 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3131 | volatile int f2py_success = 1; | |||
| 3132 | /*decl*/ | |||
| 3133 | ||||
| 3134 | int n = 0; | |||
| 3135 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3136 | complex_float a; | |||
| 3137 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 3138 | complex_float *x = NULL((void*)0); | |||
| 3139 | npy_intp x_Dims[1] = {-1}; | |||
| 3140 | const int x_Rank = 1; | |||
| 3141 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3142 | int capi_x_intent = 0; | |||
| 3143 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3144 | int offx = 0; | |||
| 3145 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3146 | int incx = 0; | |||
| 3147 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3148 | static char *capi_kwlist[] = {"a","x","n","offx","incx",NULL((void*)0)}; | |||
| 3149 | ||||
| 3150 | /*routdebugenter*/ | |||
| 3151 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3152 | f2py_start_clock(); | |||
| 3153 | #endif | |||
| 3154 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3155 | "OO|OOO:_fblas.cscal",\ | |||
| 3156 | capi_kwlist,&a_capi,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 3157 | return NULL((void*)0); | |||
| 3158 | /*frompyobj*/ | |||
| 3159 | /* Processing variable a */ | |||
| 3160 | f2py_success = complex_float_from_pyobj(&a,a_capi,"_fblas.cscal() 1st argument (a) can't be converted to complex_float"); | |||
| 3161 | if (f2py_success) { | |||
| 3162 | /* Processing variable x */ | |||
| 3163 | ; | |||
| 3164 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3165 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3166 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3167 | if (!PyErr_Occurred()) | |||
| 3168 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.cscal to C/Fortran array" ); | |||
| 3169 | } else { | |||
| 3170 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3171 | ||||
| 3172 | /* Processing variable incx */ | |||
| 3173 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3174 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cscal() 3rd keyword (incx) can't be converted to int"); | |||
| 3175 | if (f2py_success) { | |||
| 3176 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","cscal:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cscal:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3177 | /* Processing variable offx */ | |||
| 3178 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3179 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cscal() 2nd keyword (offx) can't be converted to int"); | |||
| 3180 | if (f2py_success) { | |||
| 3181 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","cscal:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cscal:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3182 | /* Processing variable n */ | |||
| 3183 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3184 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cscal() 1st keyword (n) can't be converted to int"); | |||
| 3185 | if (f2py_success) { | |||
| 3186 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","cscal:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cscal:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3187 | /*end of frompyobj*/ | |||
| 3188 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3189 | f2py_start_call_clock(); | |||
| 3190 | #endif | |||
| 3191 | /*callfortranroutine*/ | |||
| 3192 | (*f2py_func)(&n,&a,x+offx,&incx) ; | |||
| 3193 | /*(*f2py_func)(&n,&a,x,&offx,&incx);*/ | |||
| 3194 | if (PyErr_Occurred()) | |||
| 3195 | f2py_success = 0; | |||
| 3196 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3197 | f2py_stop_call_clock(); | |||
| 3198 | #endif | |||
| 3199 | /*end of callfortranroutine*/ | |||
| 3200 | if (f2py_success) { | |||
| 3201 | /*pyobjfrom*/ | |||
| 3202 | /*end of pyobjfrom*/ | |||
| 3203 | CFUNCSMESS("Building return value.\n"); | |||
| 3204 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 3205 | /*closepyobjfrom*/ | |||
| 3206 | /*end of closepyobjfrom*/ | |||
| 3207 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3208 | /*cleanupfrompyobj*/ | |||
| 3209 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3210 | } /*if (f2py_success) of n*/ | |||
| 3211 | /* End of cleaning variable n */ | |||
| 3212 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3213 | } /*if (f2py_success) of offx*/ | |||
| 3214 | /* End of cleaning variable offx */ | |||
| 3215 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3216 | } /*if (f2py_success) of incx*/ | |||
| 3217 | /* End of cleaning variable incx */ | |||
| 3218 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3219 | /* End of cleaning variable x */ | |||
| 3220 | } /*if (f2py_success) of a frompyobj*/ | |||
| 3221 | /* End of cleaning variable a */ | |||
| 3222 | /*end of cleanupfrompyobj*/ | |||
| 3223 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3224 | /*routdebugfailure*/ | |||
| 3225 | } else { | |||
| 3226 | /*routdebugleave*/ | |||
| 3227 | } | |||
| 3228 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3229 | /*freemem*/ | |||
| 3230 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3231 | f2py_stop_clock(); | |||
| 3232 | #endif | |||
| 3233 | return capi_buildvalue; | |||
| 3234 | } | |||
| 3235 | /******************************** end of cscal ********************************/ | |||
| 3236 | ||||
| 3237 | /*********************************** zscal ***********************************/ | |||
| 3238 | static char doc_f2py_rout__fblas_zscal[] = "\ | |||
| 3239 | x = zscal(a,x,[n,offx,incx])\n\nWrapper for ``zscal``.\ | |||
| 3240 | \n\nParameters\n----------\n" | |||
| 3241 | "a : input complex\n" | |||
| 3242 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 3243 | "\nOther Parameters\n----------------\n" | |||
| 3244 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3245 | "offx : input int, optional\n Default: 0\n" | |||
| 3246 | "incx : input int, optional\n Default: 1\n" | |||
| 3247 | "\nReturns\n-------\n" | |||
| 3248 | "x : rank-1 array('D') with bounds (*)"; | |||
| 3249 | /* extern void F_FUNC(zscal,ZSCAL)(F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 3250 | static PyObject *f2py_rout__fblas_zscal(const PyObject *capi_self, | |||
| 3251 | PyObject *capi_args, | |||
| 3252 | PyObject *capi_keywds, | |||
| 3253 | void (*f2py_func)(F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 3254 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3255 | volatile int f2py_success = 1; | |||
| 3256 | /*decl*/ | |||
| 3257 | ||||
| 3258 | int n = 0; | |||
| 3259 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3260 | complex_double a; | |||
| 3261 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 3262 | complex_double *x = NULL((void*)0); | |||
| 3263 | npy_intp x_Dims[1] = {-1}; | |||
| 3264 | const int x_Rank = 1; | |||
| 3265 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3266 | int capi_x_intent = 0; | |||
| 3267 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3268 | int offx = 0; | |||
| 3269 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3270 | int incx = 0; | |||
| 3271 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3272 | static char *capi_kwlist[] = {"a","x","n","offx","incx",NULL((void*)0)}; | |||
| 3273 | ||||
| 3274 | /*routdebugenter*/ | |||
| 3275 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3276 | f2py_start_clock(); | |||
| 3277 | #endif | |||
| 3278 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3279 | "OO|OOO:_fblas.zscal",\ | |||
| 3280 | capi_kwlist,&a_capi,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 3281 | return NULL((void*)0); | |||
| 3282 | /*frompyobj*/ | |||
| 3283 | /* Processing variable a */ | |||
| 3284 | f2py_success = complex_double_from_pyobj(&a,a_capi,"_fblas.zscal() 1st argument (a) can't be converted to complex_double"); | |||
| 3285 | if (f2py_success) { | |||
| 3286 | /* Processing variable x */ | |||
| 3287 | ; | |||
| 3288 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3289 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3290 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3291 | if (!PyErr_Occurred()) | |||
| 3292 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zscal to C/Fortran array" ); | |||
| 3293 | } else { | |||
| 3294 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3295 | ||||
| 3296 | /* Processing variable incx */ | |||
| 3297 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3298 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zscal() 3rd keyword (incx) can't be converted to int"); | |||
| 3299 | if (f2py_success) { | |||
| 3300 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zscal:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zscal:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3301 | /* Processing variable offx */ | |||
| 3302 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3303 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zscal() 2nd keyword (offx) can't be converted to int"); | |||
| 3304 | if (f2py_success) { | |||
| 3305 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zscal:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zscal:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3306 | /* Processing variable n */ | |||
| 3307 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3308 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zscal() 1st keyword (n) can't be converted to int"); | |||
| 3309 | if (f2py_success) { | |||
| 3310 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zscal:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zscal:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3311 | /*end of frompyobj*/ | |||
| 3312 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3313 | f2py_start_call_clock(); | |||
| 3314 | #endif | |||
| 3315 | /*callfortranroutine*/ | |||
| 3316 | (*f2py_func)(&n,&a,x+offx,&incx) ; | |||
| 3317 | /*(*f2py_func)(&n,&a,x,&offx,&incx);*/ | |||
| 3318 | if (PyErr_Occurred()) | |||
| 3319 | f2py_success = 0; | |||
| 3320 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3321 | f2py_stop_call_clock(); | |||
| 3322 | #endif | |||
| 3323 | /*end of callfortranroutine*/ | |||
| 3324 | if (f2py_success) { | |||
| 3325 | /*pyobjfrom*/ | |||
| 3326 | /*end of pyobjfrom*/ | |||
| 3327 | CFUNCSMESS("Building return value.\n"); | |||
| 3328 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 3329 | /*closepyobjfrom*/ | |||
| 3330 | /*end of closepyobjfrom*/ | |||
| 3331 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3332 | /*cleanupfrompyobj*/ | |||
| 3333 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3334 | } /*if (f2py_success) of n*/ | |||
| 3335 | /* End of cleaning variable n */ | |||
| 3336 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3337 | } /*if (f2py_success) of offx*/ | |||
| 3338 | /* End of cleaning variable offx */ | |||
| 3339 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3340 | } /*if (f2py_success) of incx*/ | |||
| 3341 | /* End of cleaning variable incx */ | |||
| 3342 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3343 | /* End of cleaning variable x */ | |||
| 3344 | } /*if (f2py_success) of a frompyobj*/ | |||
| 3345 | /* End of cleaning variable a */ | |||
| 3346 | /*end of cleanupfrompyobj*/ | |||
| 3347 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3348 | /*routdebugfailure*/ | |||
| 3349 | } else { | |||
| 3350 | /*routdebugleave*/ | |||
| 3351 | } | |||
| 3352 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3353 | /*freemem*/ | |||
| 3354 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3355 | f2py_stop_clock(); | |||
| 3356 | #endif | |||
| 3357 | return capi_buildvalue; | |||
| 3358 | } | |||
| 3359 | /******************************** end of zscal ********************************/ | |||
| 3360 | ||||
| 3361 | /*********************************** csscal ***********************************/ | |||
| 3362 | static char doc_f2py_rout__fblas_csscal[] = "\ | |||
| 3363 | x = csscal(a,x,[n,offx,incx,overwrite_x])\n\nWrapper for ``csscal``.\ | |||
| 3364 | \n\nParameters\n----------\n" | |||
| 3365 | "a : input float\n" | |||
| 3366 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 3367 | "\nOther Parameters\n----------------\n" | |||
| 3368 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3369 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 3370 | "offx : input int, optional\n Default: 0\n" | |||
| 3371 | "incx : input int, optional\n Default: 1\n" | |||
| 3372 | "\nReturns\n-------\n" | |||
| 3373 | "x : rank-1 array('F') with bounds (*)"; | |||
| 3374 | /* extern void F_FUNC(csscal,CSSCAL)(F_INT*,float*,complex_float*,F_INT* ); */ | |||
| 3375 | static PyObject *f2py_rout__fblas_csscal(const PyObject *capi_self, | |||
| 3376 | PyObject *capi_args, | |||
| 3377 | PyObject *capi_keywds, | |||
| 3378 | void (*f2py_func)(F_INTint*,float*,complex_float*,F_INTint* )) { | |||
| 3379 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3380 | volatile int f2py_success = 1; | |||
| 3381 | /*decl*/ | |||
| 3382 | ||||
| 3383 | int n = 0; | |||
| 3384 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3385 | float a = 0; | |||
| 3386 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 3387 | complex_float *x = NULL((void*)0); | |||
| 3388 | npy_intp x_Dims[1] = {-1}; | |||
| 3389 | const int x_Rank = 1; | |||
| 3390 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3391 | int capi_x_intent = 0; | |||
| 3392 | int capi_overwrite_x = 0; | |||
| 3393 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3394 | int offx = 0; | |||
| 3395 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3396 | int incx = 0; | |||
| 3397 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3398 | static char *capi_kwlist[] = {"a","x","n","offx","incx","overwrite_x",NULL((void*)0)}; | |||
| 3399 | ||||
| 3400 | /*routdebugenter*/ | |||
| 3401 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3402 | f2py_start_clock(); | |||
| 3403 | #endif | |||
| 3404 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3405 | "OO|OOOi:_fblas.csscal",\ | |||
| 3406 | capi_kwlist,&a_capi,&x_capi,&n_capi,&offx_capi,&incx_capi,&capi_overwrite_x)) | |||
| 3407 | return NULL((void*)0); | |||
| 3408 | /*frompyobj*/ | |||
| 3409 | /* Processing variable a */ | |||
| 3410 | f2py_success = float_from_pyobj(&a,a_capi,"_fblas.csscal() 1st argument (a) can't be converted to float"); | |||
| 3411 | if (f2py_success) { | |||
| 3412 | /* Processing variable x */ | |||
| 3413 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 3414 | ; | |||
| 3415 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3416 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3417 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3418 | if (!PyErr_Occurred()) | |||
| 3419 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.csscal to C/Fortran array" ); | |||
| 3420 | } else { | |||
| 3421 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3422 | ||||
| 3423 | /* Processing variable incx */ | |||
| 3424 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3425 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.csscal() 3rd keyword (incx) can't be converted to int"); | |||
| 3426 | if (f2py_success) { | |||
| 3427 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","csscal:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csscal:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3428 | /* Processing variable offx */ | |||
| 3429 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3430 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.csscal() 2nd keyword (offx) can't be converted to int"); | |||
| 3431 | if (f2py_success) { | |||
| 3432 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","csscal:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csscal:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3433 | /* Processing variable n */ | |||
| 3434 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3435 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.csscal() 1st keyword (n) can't be converted to int"); | |||
| 3436 | if (f2py_success) { | |||
| 3437 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","csscal:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csscal:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3438 | /*end of frompyobj*/ | |||
| 3439 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3440 | f2py_start_call_clock(); | |||
| 3441 | #endif | |||
| 3442 | /*callfortranroutine*/ | |||
| 3443 | (*f2py_func)(&n,&a,x+offx,&incx) ; | |||
| 3444 | /*(*f2py_func)(&n,&a,x,&offx,&incx);*/ | |||
| 3445 | if (PyErr_Occurred()) | |||
| 3446 | f2py_success = 0; | |||
| 3447 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3448 | f2py_stop_call_clock(); | |||
| 3449 | #endif | |||
| 3450 | /*end of callfortranroutine*/ | |||
| 3451 | if (f2py_success) { | |||
| 3452 | /*pyobjfrom*/ | |||
| 3453 | /*end of pyobjfrom*/ | |||
| 3454 | CFUNCSMESS("Building return value.\n"); | |||
| 3455 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 3456 | /*closepyobjfrom*/ | |||
| 3457 | /*end of closepyobjfrom*/ | |||
| 3458 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3459 | /*cleanupfrompyobj*/ | |||
| 3460 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3461 | } /*if (f2py_success) of n*/ | |||
| 3462 | /* End of cleaning variable n */ | |||
| 3463 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3464 | } /*if (f2py_success) of offx*/ | |||
| 3465 | /* End of cleaning variable offx */ | |||
| 3466 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3467 | } /*if (f2py_success) of incx*/ | |||
| 3468 | /* End of cleaning variable incx */ | |||
| 3469 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3470 | /* End of cleaning variable x */ | |||
| 3471 | } /*if (f2py_success) of a*/ | |||
| 3472 | /* End of cleaning variable a */ | |||
| 3473 | /*end of cleanupfrompyobj*/ | |||
| 3474 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3475 | /*routdebugfailure*/ | |||
| 3476 | } else { | |||
| 3477 | /*routdebugleave*/ | |||
| 3478 | } | |||
| 3479 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3480 | /*freemem*/ | |||
| 3481 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3482 | f2py_stop_clock(); | |||
| 3483 | #endif | |||
| 3484 | return capi_buildvalue; | |||
| 3485 | } | |||
| 3486 | /******************************* end of csscal *******************************/ | |||
| 3487 | ||||
| 3488 | /*********************************** zdscal ***********************************/ | |||
| 3489 | static char doc_f2py_rout__fblas_zdscal[] = "\ | |||
| 3490 | x = zdscal(a,x,[n,offx,incx,overwrite_x])\n\nWrapper for ``zdscal``.\ | |||
| 3491 | \n\nParameters\n----------\n" | |||
| 3492 | "a : input float\n" | |||
| 3493 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 3494 | "\nOther Parameters\n----------------\n" | |||
| 3495 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3496 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 3497 | "offx : input int, optional\n Default: 0\n" | |||
| 3498 | "incx : input int, optional\n Default: 1\n" | |||
| 3499 | "\nReturns\n-------\n" | |||
| 3500 | "x : rank-1 array('D') with bounds (*)"; | |||
| 3501 | /* extern void F_FUNC(zdscal,ZDSCAL)(F_INT*,double*,complex_double*,F_INT* ); */ | |||
| 3502 | static PyObject *f2py_rout__fblas_zdscal(const PyObject *capi_self, | |||
| 3503 | PyObject *capi_args, | |||
| 3504 | PyObject *capi_keywds, | |||
| 3505 | void (*f2py_func)(F_INTint*,double*,complex_double*,F_INTint* )) { | |||
| 3506 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3507 | volatile int f2py_success = 1; | |||
| 3508 | /*decl*/ | |||
| 3509 | ||||
| 3510 | int n = 0; | |||
| 3511 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3512 | double a = 0; | |||
| 3513 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 3514 | complex_double *x = NULL((void*)0); | |||
| 3515 | npy_intp x_Dims[1] = {-1}; | |||
| 3516 | const int x_Rank = 1; | |||
| 3517 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3518 | int capi_x_intent = 0; | |||
| 3519 | int capi_overwrite_x = 0; | |||
| 3520 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3521 | int offx = 0; | |||
| 3522 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3523 | int incx = 0; | |||
| 3524 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3525 | static char *capi_kwlist[] = {"a","x","n","offx","incx","overwrite_x",NULL((void*)0)}; | |||
| 3526 | ||||
| 3527 | /*routdebugenter*/ | |||
| 3528 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3529 | f2py_start_clock(); | |||
| 3530 | #endif | |||
| 3531 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3532 | "OO|OOOi:_fblas.zdscal",\ | |||
| 3533 | capi_kwlist,&a_capi,&x_capi,&n_capi,&offx_capi,&incx_capi,&capi_overwrite_x)) | |||
| 3534 | return NULL((void*)0); | |||
| 3535 | /*frompyobj*/ | |||
| 3536 | /* Processing variable a */ | |||
| 3537 | f2py_success = double_from_pyobj(&a,a_capi,"_fblas.zdscal() 1st argument (a) can't be converted to double"); | |||
| 3538 | if (f2py_success) { | |||
| 3539 | /* Processing variable x */ | |||
| 3540 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 3541 | ; | |||
| 3542 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3543 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3544 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3545 | if (!PyErr_Occurred()) | |||
| 3546 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zdscal to C/Fortran array" ); | |||
| 3547 | } else { | |||
| 3548 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3549 | ||||
| 3550 | /* Processing variable incx */ | |||
| 3551 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3552 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zdscal() 3rd keyword (incx) can't be converted to int"); | |||
| 3553 | if (f2py_success) { | |||
| 3554 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zdscal:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdscal:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3555 | /* Processing variable offx */ | |||
| 3556 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3557 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zdscal() 2nd keyword (offx) can't be converted to int"); | |||
| 3558 | if (f2py_success) { | |||
| 3559 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zdscal:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdscal:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3560 | /* Processing variable n */ | |||
| 3561 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3562 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zdscal() 1st keyword (n) can't be converted to int"); | |||
| 3563 | if (f2py_success) { | |||
| 3564 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zdscal:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdscal:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3565 | /*end of frompyobj*/ | |||
| 3566 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3567 | f2py_start_call_clock(); | |||
| 3568 | #endif | |||
| 3569 | /*callfortranroutine*/ | |||
| 3570 | (*f2py_func)(&n,&a,x+offx,&incx) ; | |||
| 3571 | /*(*f2py_func)(&n,&a,x,&offx,&incx);*/ | |||
| 3572 | if (PyErr_Occurred()) | |||
| 3573 | f2py_success = 0; | |||
| 3574 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3575 | f2py_stop_call_clock(); | |||
| 3576 | #endif | |||
| 3577 | /*end of callfortranroutine*/ | |||
| 3578 | if (f2py_success) { | |||
| 3579 | /*pyobjfrom*/ | |||
| 3580 | /*end of pyobjfrom*/ | |||
| 3581 | CFUNCSMESS("Building return value.\n"); | |||
| 3582 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 3583 | /*closepyobjfrom*/ | |||
| 3584 | /*end of closepyobjfrom*/ | |||
| 3585 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3586 | /*cleanupfrompyobj*/ | |||
| 3587 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3588 | } /*if (f2py_success) of n*/ | |||
| 3589 | /* End of cleaning variable n */ | |||
| 3590 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3591 | } /*if (f2py_success) of offx*/ | |||
| 3592 | /* End of cleaning variable offx */ | |||
| 3593 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3594 | } /*if (f2py_success) of incx*/ | |||
| 3595 | /* End of cleaning variable incx */ | |||
| 3596 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3597 | /* End of cleaning variable x */ | |||
| 3598 | } /*if (f2py_success) of a*/ | |||
| 3599 | /* End of cleaning variable a */ | |||
| 3600 | /*end of cleanupfrompyobj*/ | |||
| 3601 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3602 | /*routdebugfailure*/ | |||
| 3603 | } else { | |||
| 3604 | /*routdebugleave*/ | |||
| 3605 | } | |||
| 3606 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3607 | /*freemem*/ | |||
| 3608 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3609 | f2py_stop_clock(); | |||
| 3610 | #endif | |||
| 3611 | return capi_buildvalue; | |||
| 3612 | } | |||
| 3613 | /******************************* end of zdscal *******************************/ | |||
| 3614 | ||||
| 3615 | /*********************************** scopy ***********************************/ | |||
| 3616 | static char doc_f2py_rout__fblas_scopy[] = "\ | |||
| 3617 | y = scopy(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``scopy``.\ | |||
| 3618 | \n\nParameters\n----------\n" | |||
| 3619 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 3620 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 3621 | "\nOther Parameters\n----------------\n" | |||
| 3622 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3623 | "offx : input int, optional\n Default: 0\n" | |||
| 3624 | "incx : input int, optional\n Default: 1\n" | |||
| 3625 | "offy : input int, optional\n Default: 0\n" | |||
| 3626 | "incy : input int, optional\n Default: 1\n" | |||
| 3627 | "\nReturns\n-------\n" | |||
| 3628 | "y : rank-1 array('f') with bounds (*)"; | |||
| 3629 | /* extern void F_FUNC(scopy,SCOPY)(F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 3630 | static PyObject *f2py_rout__fblas_scopy(const PyObject *capi_self, | |||
| 3631 | PyObject *capi_args, | |||
| 3632 | PyObject *capi_keywds, | |||
| 3633 | void (*f2py_func)(F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 3634 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3635 | volatile int f2py_success = 1; | |||
| 3636 | /*decl*/ | |||
| 3637 | ||||
| 3638 | int n = 0; | |||
| 3639 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3640 | float *x = NULL((void*)0); | |||
| 3641 | npy_intp x_Dims[1] = {-1}; | |||
| 3642 | const int x_Rank = 1; | |||
| 3643 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3644 | int capi_x_intent = 0; | |||
| 3645 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3646 | int offx = 0; | |||
| 3647 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3648 | int incx = 0; | |||
| 3649 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3650 | float *y = NULL((void*)0); | |||
| 3651 | npy_intp y_Dims[1] = {-1}; | |||
| 3652 | const int y_Rank = 1; | |||
| 3653 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 3654 | int capi_y_intent = 0; | |||
| 3655 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 3656 | int offy = 0; | |||
| 3657 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 3658 | int incy = 0; | |||
| 3659 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 3660 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 3661 | ||||
| 3662 | /*routdebugenter*/ | |||
| 3663 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3664 | f2py_start_clock(); | |||
| 3665 | #endif | |||
| 3666 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3667 | "OO|OOOOO:_fblas.scopy",\ | |||
| 3668 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 3669 | return NULL((void*)0); | |||
| 3670 | /*frompyobj*/ | |||
| 3671 | /* Processing variable x */ | |||
| 3672 | ; | |||
| 3673 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 3674 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3675 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3676 | if (!PyErr_Occurred()) | |||
| 3677 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.scopy to C/Fortran array" ); | |||
| 3678 | } else { | |||
| 3679 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3680 | ||||
| 3681 | /* Processing variable y */ | |||
| 3682 | ; | |||
| 3683 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3684 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 3685 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 3686 | if (!PyErr_Occurred()) | |||
| 3687 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.scopy to C/Fortran array" ); | |||
| 3688 | } else { | |||
| 3689 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 3690 | ||||
| 3691 | /* Processing variable incx */ | |||
| 3692 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3693 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.scopy() 3rd keyword (incx) can't be converted to int"); | |||
| 3694 | if (f2py_success) { | |||
| 3695 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","scopy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""scopy:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3696 | /* Processing variable incy */ | |||
| 3697 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 3698 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.scopy() 5th keyword (incy) can't be converted to int"); | |||
| 3699 | if (f2py_success) { | |||
| 3700 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","scopy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""scopy:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3701 | /* Processing variable offx */ | |||
| 3702 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3703 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.scopy() 2nd keyword (offx) can't be converted to int"); | |||
| 3704 | if (f2py_success) { | |||
| 3705 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","scopy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scopy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3706 | /* Processing variable offy */ | |||
| 3707 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 3708 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.scopy() 4th keyword (offy) can't be converted to int"); | |||
| 3709 | if (f2py_success) { | |||
| 3710 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","scopy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scopy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3711 | /* Processing variable n */ | |||
| 3712 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3713 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.scopy() 1st keyword (n) can't be converted to int"); | |||
| 3714 | if (f2py_success) { | |||
| 3715 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","scopy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scopy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3716 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","scopy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scopy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3717 | /*end of frompyobj*/ | |||
| 3718 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3719 | f2py_start_call_clock(); | |||
| 3720 | #endif | |||
| 3721 | /*callfortranroutine*/ | |||
| 3722 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 3723 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 3724 | if (PyErr_Occurred()) | |||
| 3725 | f2py_success = 0; | |||
| 3726 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3727 | f2py_stop_call_clock(); | |||
| 3728 | #endif | |||
| 3729 | /*end of callfortranroutine*/ | |||
| 3730 | if (f2py_success) { | |||
| 3731 | /*pyobjfrom*/ | |||
| 3732 | /*end of pyobjfrom*/ | |||
| 3733 | CFUNCSMESS("Building return value.\n"); | |||
| 3734 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 3735 | /*closepyobjfrom*/ | |||
| 3736 | /*end of closepyobjfrom*/ | |||
| 3737 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3738 | /*cleanupfrompyobj*/ | |||
| 3739 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3740 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 3741 | } /*if (f2py_success) of n*/ | |||
| 3742 | /* End of cleaning variable n */ | |||
| 3743 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 3744 | } /*if (f2py_success) of offy*/ | |||
| 3745 | /* End of cleaning variable offy */ | |||
| 3746 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3747 | } /*if (f2py_success) of offx*/ | |||
| 3748 | /* End of cleaning variable offx */ | |||
| 3749 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 3750 | } /*if (f2py_success) of incy*/ | |||
| 3751 | /* End of cleaning variable incy */ | |||
| 3752 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3753 | } /*if (f2py_success) of incx*/ | |||
| 3754 | /* End of cleaning variable incx */ | |||
| 3755 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 3756 | /* End of cleaning variable y */ | |||
| 3757 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 3758 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 3759 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3760 | /* End of cleaning variable x */ | |||
| 3761 | /*end of cleanupfrompyobj*/ | |||
| 3762 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3763 | /*routdebugfailure*/ | |||
| 3764 | } else { | |||
| 3765 | /*routdebugleave*/ | |||
| 3766 | } | |||
| 3767 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3768 | /*freemem*/ | |||
| 3769 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3770 | f2py_stop_clock(); | |||
| 3771 | #endif | |||
| 3772 | return capi_buildvalue; | |||
| 3773 | } | |||
| 3774 | /******************************** end of scopy ********************************/ | |||
| 3775 | ||||
| 3776 | /*********************************** dcopy ***********************************/ | |||
| 3777 | static char doc_f2py_rout__fblas_dcopy[] = "\ | |||
| 3778 | y = dcopy(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``dcopy``.\ | |||
| 3779 | \n\nParameters\n----------\n" | |||
| 3780 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 3781 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 3782 | "\nOther Parameters\n----------------\n" | |||
| 3783 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3784 | "offx : input int, optional\n Default: 0\n" | |||
| 3785 | "incx : input int, optional\n Default: 1\n" | |||
| 3786 | "offy : input int, optional\n Default: 0\n" | |||
| 3787 | "incy : input int, optional\n Default: 1\n" | |||
| 3788 | "\nReturns\n-------\n" | |||
| 3789 | "y : rank-1 array('d') with bounds (*)"; | |||
| 3790 | /* extern void F_FUNC(dcopy,DCOPY)(F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 3791 | static PyObject *f2py_rout__fblas_dcopy(const PyObject *capi_self, | |||
| 3792 | PyObject *capi_args, | |||
| 3793 | PyObject *capi_keywds, | |||
| 3794 | void (*f2py_func)(F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 3795 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3796 | volatile int f2py_success = 1; | |||
| 3797 | /*decl*/ | |||
| 3798 | ||||
| 3799 | int n = 0; | |||
| 3800 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3801 | double *x = NULL((void*)0); | |||
| 3802 | npy_intp x_Dims[1] = {-1}; | |||
| 3803 | const int x_Rank = 1; | |||
| 3804 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3805 | int capi_x_intent = 0; | |||
| 3806 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3807 | int offx = 0; | |||
| 3808 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3809 | int incx = 0; | |||
| 3810 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3811 | double *y = NULL((void*)0); | |||
| 3812 | npy_intp y_Dims[1] = {-1}; | |||
| 3813 | const int y_Rank = 1; | |||
| 3814 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 3815 | int capi_y_intent = 0; | |||
| 3816 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 3817 | int offy = 0; | |||
| 3818 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 3819 | int incy = 0; | |||
| 3820 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 3821 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 3822 | ||||
| 3823 | /*routdebugenter*/ | |||
| 3824 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3825 | f2py_start_clock(); | |||
| 3826 | #endif | |||
| 3827 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3828 | "OO|OOOOO:_fblas.dcopy",\ | |||
| 3829 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 3830 | return NULL((void*)0); | |||
| 3831 | /*frompyobj*/ | |||
| 3832 | /* Processing variable x */ | |||
| 3833 | ; | |||
| 3834 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 3835 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3836 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3837 | if (!PyErr_Occurred()) | |||
| 3838 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.dcopy to C/Fortran array" ); | |||
| 3839 | } else { | |||
| 3840 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 3841 | ||||
| 3842 | /* Processing variable y */ | |||
| 3843 | ; | |||
| 3844 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 3845 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 3846 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 3847 | if (!PyErr_Occurred()) | |||
| 3848 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.dcopy to C/Fortran array" ); | |||
| 3849 | } else { | |||
| 3850 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 3851 | ||||
| 3852 | /* Processing variable incx */ | |||
| 3853 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 3854 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dcopy() 3rd keyword (incx) can't be converted to int"); | |||
| 3855 | if (f2py_success) { | |||
| 3856 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dcopy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dcopy:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3857 | /* Processing variable incy */ | |||
| 3858 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 3859 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dcopy() 5th keyword (incy) can't be converted to int"); | |||
| 3860 | if (f2py_success) { | |||
| 3861 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","dcopy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dcopy:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 3862 | /* Processing variable offx */ | |||
| 3863 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 3864 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dcopy() 2nd keyword (offx) can't be converted to int"); | |||
| 3865 | if (f2py_success) { | |||
| 3866 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dcopy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dcopy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3867 | /* Processing variable offy */ | |||
| 3868 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 3869 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dcopy() 4th keyword (offy) can't be converted to int"); | |||
| 3870 | if (f2py_success) { | |||
| 3871 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","dcopy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dcopy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3872 | /* Processing variable n */ | |||
| 3873 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 3874 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dcopy() 1st keyword (n) can't be converted to int"); | |||
| 3875 | if (f2py_success) { | |||
| 3876 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","dcopy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dcopy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3877 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dcopy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dcopy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 3878 | /*end of frompyobj*/ | |||
| 3879 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3880 | f2py_start_call_clock(); | |||
| 3881 | #endif | |||
| 3882 | /*callfortranroutine*/ | |||
| 3883 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 3884 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 3885 | if (PyErr_Occurred()) | |||
| 3886 | f2py_success = 0; | |||
| 3887 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3888 | f2py_stop_call_clock(); | |||
| 3889 | #endif | |||
| 3890 | /*end of callfortranroutine*/ | |||
| 3891 | if (f2py_success) { | |||
| 3892 | /*pyobjfrom*/ | |||
| 3893 | /*end of pyobjfrom*/ | |||
| 3894 | CFUNCSMESS("Building return value.\n"); | |||
| 3895 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 3896 | /*closepyobjfrom*/ | |||
| 3897 | /*end of closepyobjfrom*/ | |||
| 3898 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 3899 | /*cleanupfrompyobj*/ | |||
| 3900 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 3901 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 3902 | } /*if (f2py_success) of n*/ | |||
| 3903 | /* End of cleaning variable n */ | |||
| 3904 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 3905 | } /*if (f2py_success) of offy*/ | |||
| 3906 | /* End of cleaning variable offy */ | |||
| 3907 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 3908 | } /*if (f2py_success) of offx*/ | |||
| 3909 | /* End of cleaning variable offx */ | |||
| 3910 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 3911 | } /*if (f2py_success) of incy*/ | |||
| 3912 | /* End of cleaning variable incy */ | |||
| 3913 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 3914 | } /*if (f2py_success) of incx*/ | |||
| 3915 | /* End of cleaning variable incx */ | |||
| 3916 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 3917 | /* End of cleaning variable y */ | |||
| 3918 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 3919 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 3920 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 3921 | /* End of cleaning variable x */ | |||
| 3922 | /*end of cleanupfrompyobj*/ | |||
| 3923 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 3924 | /*routdebugfailure*/ | |||
| 3925 | } else { | |||
| 3926 | /*routdebugleave*/ | |||
| 3927 | } | |||
| 3928 | CFUNCSMESS("Freeing memory.\n"); | |||
| 3929 | /*freemem*/ | |||
| 3930 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3931 | f2py_stop_clock(); | |||
| 3932 | #endif | |||
| 3933 | return capi_buildvalue; | |||
| 3934 | } | |||
| 3935 | /******************************** end of dcopy ********************************/ | |||
| 3936 | ||||
| 3937 | /*********************************** ccopy ***********************************/ | |||
| 3938 | static char doc_f2py_rout__fblas_ccopy[] = "\ | |||
| 3939 | y = ccopy(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``ccopy``.\ | |||
| 3940 | \n\nParameters\n----------\n" | |||
| 3941 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 3942 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 3943 | "\nOther Parameters\n----------------\n" | |||
| 3944 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 3945 | "offx : input int, optional\n Default: 0\n" | |||
| 3946 | "incx : input int, optional\n Default: 1\n" | |||
| 3947 | "offy : input int, optional\n Default: 0\n" | |||
| 3948 | "incy : input int, optional\n Default: 1\n" | |||
| 3949 | "\nReturns\n-------\n" | |||
| 3950 | "y : rank-1 array('F') with bounds (*)"; | |||
| 3951 | /* extern void F_FUNC(ccopy,CCOPY)(F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 3952 | static PyObject *f2py_rout__fblas_ccopy(const PyObject *capi_self, | |||
| 3953 | PyObject *capi_args, | |||
| 3954 | PyObject *capi_keywds, | |||
| 3955 | void (*f2py_func)(F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 3956 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 3957 | volatile int f2py_success = 1; | |||
| 3958 | /*decl*/ | |||
| 3959 | ||||
| 3960 | int n = 0; | |||
| 3961 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 3962 | complex_float *x = NULL((void*)0); | |||
| 3963 | npy_intp x_Dims[1] = {-1}; | |||
| 3964 | const int x_Rank = 1; | |||
| 3965 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 3966 | int capi_x_intent = 0; | |||
| 3967 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 3968 | int offx = 0; | |||
| 3969 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 3970 | int incx = 0; | |||
| 3971 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 3972 | complex_float *y = NULL((void*)0); | |||
| 3973 | npy_intp y_Dims[1] = {-1}; | |||
| 3974 | const int y_Rank = 1; | |||
| 3975 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 3976 | int capi_y_intent = 0; | |||
| 3977 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 3978 | int offy = 0; | |||
| 3979 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 3980 | int incy = 0; | |||
| 3981 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 3982 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 3983 | ||||
| 3984 | /*routdebugenter*/ | |||
| 3985 | #ifdef F2PY_REPORT_ATEXIT | |||
| 3986 | f2py_start_clock(); | |||
| 3987 | #endif | |||
| 3988 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 3989 | "OO|OOOOO:_fblas.ccopy",\ | |||
| 3990 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 3991 | return NULL((void*)0); | |||
| 3992 | /*frompyobj*/ | |||
| 3993 | /* Processing variable x */ | |||
| 3994 | ; | |||
| 3995 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 3996 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 3997 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 3998 | if (!PyErr_Occurred()) | |||
| 3999 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.ccopy to C/Fortran array" ); | |||
| 4000 | } else { | |||
| 4001 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 4002 | ||||
| 4003 | /* Processing variable y */ | |||
| 4004 | ; | |||
| 4005 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 4006 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 4007 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 4008 | if (!PyErr_Occurred()) | |||
| 4009 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.ccopy to C/Fortran array" ); | |||
| 4010 | } else { | |||
| 4011 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 4012 | ||||
| 4013 | /* Processing variable incx */ | |||
| 4014 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 4015 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ccopy() 3rd keyword (incx) can't be converted to int"); | |||
| 4016 | if (f2py_success) { | |||
| 4017 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","ccopy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ccopy:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4018 | /* Processing variable incy */ | |||
| 4019 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 4020 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.ccopy() 5th keyword (incy) can't be converted to int"); | |||
| 4021 | if (f2py_success) { | |||
| 4022 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","ccopy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ccopy:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4023 | /* Processing variable offx */ | |||
| 4024 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 4025 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ccopy() 2nd keyword (offx) can't be converted to int"); | |||
| 4026 | if (f2py_success) { | |||
| 4027 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","ccopy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ccopy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4028 | /* Processing variable offy */ | |||
| 4029 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 4030 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.ccopy() 4th keyword (offy) can't be converted to int"); | |||
| 4031 | if (f2py_success) { | |||
| 4032 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","ccopy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ccopy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4033 | /* Processing variable n */ | |||
| 4034 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 4035 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ccopy() 1st keyword (n) can't be converted to int"); | |||
| 4036 | if (f2py_success) { | |||
| 4037 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","ccopy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ccopy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4038 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","ccopy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ccopy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4039 | /*end of frompyobj*/ | |||
| 4040 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4041 | f2py_start_call_clock(); | |||
| 4042 | #endif | |||
| 4043 | /*callfortranroutine*/ | |||
| 4044 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 4045 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 4046 | if (PyErr_Occurred()) | |||
| 4047 | f2py_success = 0; | |||
| 4048 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4049 | f2py_stop_call_clock(); | |||
| 4050 | #endif | |||
| 4051 | /*end of callfortranroutine*/ | |||
| 4052 | if (f2py_success) { | |||
| 4053 | /*pyobjfrom*/ | |||
| 4054 | /*end of pyobjfrom*/ | |||
| 4055 | CFUNCSMESS("Building return value.\n"); | |||
| 4056 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 4057 | /*closepyobjfrom*/ | |||
| 4058 | /*end of closepyobjfrom*/ | |||
| 4059 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 4060 | /*cleanupfrompyobj*/ | |||
| 4061 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 4062 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 4063 | } /*if (f2py_success) of n*/ | |||
| 4064 | /* End of cleaning variable n */ | |||
| 4065 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 4066 | } /*if (f2py_success) of offy*/ | |||
| 4067 | /* End of cleaning variable offy */ | |||
| 4068 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 4069 | } /*if (f2py_success) of offx*/ | |||
| 4070 | /* End of cleaning variable offx */ | |||
| 4071 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 4072 | } /*if (f2py_success) of incy*/ | |||
| 4073 | /* End of cleaning variable incy */ | |||
| 4074 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 4075 | } /*if (f2py_success) of incx*/ | |||
| 4076 | /* End of cleaning variable incx */ | |||
| 4077 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 4078 | /* End of cleaning variable y */ | |||
| 4079 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 4080 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 4081 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 4082 | /* End of cleaning variable x */ | |||
| 4083 | /*end of cleanupfrompyobj*/ | |||
| 4084 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 4085 | /*routdebugfailure*/ | |||
| 4086 | } else { | |||
| 4087 | /*routdebugleave*/ | |||
| 4088 | } | |||
| 4089 | CFUNCSMESS("Freeing memory.\n"); | |||
| 4090 | /*freemem*/ | |||
| 4091 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4092 | f2py_stop_clock(); | |||
| 4093 | #endif | |||
| 4094 | return capi_buildvalue; | |||
| 4095 | } | |||
| 4096 | /******************************** end of ccopy ********************************/ | |||
| 4097 | ||||
| 4098 | /*********************************** zcopy ***********************************/ | |||
| 4099 | static char doc_f2py_rout__fblas_zcopy[] = "\ | |||
| 4100 | y = zcopy(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``zcopy``.\ | |||
| 4101 | \n\nParameters\n----------\n" | |||
| 4102 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 4103 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 4104 | "\nOther Parameters\n----------------\n" | |||
| 4105 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 4106 | "offx : input int, optional\n Default: 0\n" | |||
| 4107 | "incx : input int, optional\n Default: 1\n" | |||
| 4108 | "offy : input int, optional\n Default: 0\n" | |||
| 4109 | "incy : input int, optional\n Default: 1\n" | |||
| 4110 | "\nReturns\n-------\n" | |||
| 4111 | "y : rank-1 array('D') with bounds (*)"; | |||
| 4112 | /* extern void F_FUNC(zcopy,ZCOPY)(F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 4113 | static PyObject *f2py_rout__fblas_zcopy(const PyObject *capi_self, | |||
| 4114 | PyObject *capi_args, | |||
| 4115 | PyObject *capi_keywds, | |||
| 4116 | void (*f2py_func)(F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 4117 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 4118 | volatile int f2py_success = 1; | |||
| 4119 | /*decl*/ | |||
| 4120 | ||||
| 4121 | int n = 0; | |||
| 4122 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 4123 | complex_double *x = NULL((void*)0); | |||
| 4124 | npy_intp x_Dims[1] = {-1}; | |||
| 4125 | const int x_Rank = 1; | |||
| 4126 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 4127 | int capi_x_intent = 0; | |||
| 4128 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 4129 | int offx = 0; | |||
| 4130 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 4131 | int incx = 0; | |||
| 4132 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 4133 | complex_double *y = NULL((void*)0); | |||
| 4134 | npy_intp y_Dims[1] = {-1}; | |||
| 4135 | const int y_Rank = 1; | |||
| 4136 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 4137 | int capi_y_intent = 0; | |||
| 4138 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 4139 | int offy = 0; | |||
| 4140 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 4141 | int incy = 0; | |||
| 4142 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 4143 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 4144 | ||||
| 4145 | /*routdebugenter*/ | |||
| 4146 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4147 | f2py_start_clock(); | |||
| 4148 | #endif | |||
| 4149 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 4150 | "OO|OOOOO:_fblas.zcopy",\ | |||
| 4151 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 4152 | return NULL((void*)0); | |||
| 4153 | /*frompyobj*/ | |||
| 4154 | /* Processing variable x */ | |||
| 4155 | ; | |||
| 4156 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 4157 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 4158 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 4159 | if (!PyErr_Occurred()) | |||
| 4160 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.zcopy to C/Fortran array" ); | |||
| 4161 | } else { | |||
| 4162 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 4163 | ||||
| 4164 | /* Processing variable y */ | |||
| 4165 | ; | |||
| 4166 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 4167 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 4168 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 4169 | if (!PyErr_Occurred()) | |||
| 4170 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.zcopy to C/Fortran array" ); | |||
| 4171 | } else { | |||
| 4172 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 4173 | ||||
| 4174 | /* Processing variable incx */ | |||
| 4175 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 4176 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zcopy() 3rd keyword (incx) can't be converted to int"); | |||
| 4177 | if (f2py_success) { | |||
| 4178 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zcopy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zcopy:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4179 | /* Processing variable incy */ | |||
| 4180 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 4181 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zcopy() 5th keyword (incy) can't be converted to int"); | |||
| 4182 | if (f2py_success) { | |||
| 4183 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zcopy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zcopy:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4184 | /* Processing variable offx */ | |||
| 4185 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 4186 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zcopy() 2nd keyword (offx) can't be converted to int"); | |||
| 4187 | if (f2py_success) { | |||
| 4188 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zcopy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zcopy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4189 | /* Processing variable offy */ | |||
| 4190 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 4191 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zcopy() 4th keyword (offy) can't be converted to int"); | |||
| 4192 | if (f2py_success) { | |||
| 4193 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","zcopy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zcopy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4194 | /* Processing variable n */ | |||
| 4195 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 4196 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zcopy() 1st keyword (n) can't be converted to int"); | |||
| 4197 | if (f2py_success) { | |||
| 4198 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","zcopy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zcopy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4199 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zcopy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zcopy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4200 | /*end of frompyobj*/ | |||
| 4201 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4202 | f2py_start_call_clock(); | |||
| 4203 | #endif | |||
| 4204 | /*callfortranroutine*/ | |||
| 4205 | (*f2py_func)(&n,x+offx,&incx,y+offy,&incy) ; | |||
| 4206 | /*(*f2py_func)(&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 4207 | if (PyErr_Occurred()) | |||
| 4208 | f2py_success = 0; | |||
| 4209 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4210 | f2py_stop_call_clock(); | |||
| 4211 | #endif | |||
| 4212 | /*end of callfortranroutine*/ | |||
| 4213 | if (f2py_success) { | |||
| 4214 | /*pyobjfrom*/ | |||
| 4215 | /*end of pyobjfrom*/ | |||
| 4216 | CFUNCSMESS("Building return value.\n"); | |||
| 4217 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 4218 | /*closepyobjfrom*/ | |||
| 4219 | /*end of closepyobjfrom*/ | |||
| 4220 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 4221 | /*cleanupfrompyobj*/ | |||
| 4222 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 4223 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 4224 | } /*if (f2py_success) of n*/ | |||
| 4225 | /* End of cleaning variable n */ | |||
| 4226 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 4227 | } /*if (f2py_success) of offy*/ | |||
| 4228 | /* End of cleaning variable offy */ | |||
| 4229 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 4230 | } /*if (f2py_success) of offx*/ | |||
| 4231 | /* End of cleaning variable offx */ | |||
| 4232 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 4233 | } /*if (f2py_success) of incy*/ | |||
| 4234 | /* End of cleaning variable incy */ | |||
| 4235 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 4236 | } /*if (f2py_success) of incx*/ | |||
| 4237 | /* End of cleaning variable incx */ | |||
| 4238 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 4239 | /* End of cleaning variable y */ | |||
| 4240 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 4241 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 4242 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 4243 | /* End of cleaning variable x */ | |||
| 4244 | /*end of cleanupfrompyobj*/ | |||
| 4245 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 4246 | /*routdebugfailure*/ | |||
| 4247 | } else { | |||
| 4248 | /*routdebugleave*/ | |||
| 4249 | } | |||
| 4250 | CFUNCSMESS("Freeing memory.\n"); | |||
| 4251 | /*freemem*/ | |||
| 4252 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4253 | f2py_stop_clock(); | |||
| 4254 | #endif | |||
| 4255 | return capi_buildvalue; | |||
| 4256 | } | |||
| 4257 | /******************************** end of zcopy ********************************/ | |||
| 4258 | ||||
| 4259 | /*********************************** saxpy ***********************************/ | |||
| 4260 | static char doc_f2py_rout__fblas_saxpy[] = "\ | |||
| 4261 | z = saxpy(x,y,[n,a,offx,incx,offy,incy])\n\nWrapper for ``saxpy``.\ | |||
| 4262 | \n\nParameters\n----------\n" | |||
| 4263 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 4264 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 4265 | "\nOther Parameters\n----------------\n" | |||
| 4266 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 4267 | "a : input float, optional\n Default: 1.0\n" | |||
| 4268 | "offx : input int, optional\n Default: 0\n" | |||
| 4269 | "incx : input int, optional\n Default: 1\n" | |||
| 4270 | "offy : input int, optional\n Default: 0\n" | |||
| 4271 | "incy : input int, optional\n Default: 1\n" | |||
| 4272 | "\nReturns\n-------\n" | |||
| 4273 | "z : rank-1 array('f') with bounds (*) and y storage"; | |||
| 4274 | /* extern void F_FUNC(saxpy,SAXPY)(F_INT*,float*,float*,F_INT*,float*,F_INT* ); */ | |||
| 4275 | static PyObject *f2py_rout__fblas_saxpy(const PyObject *capi_self, | |||
| 4276 | PyObject *capi_args, | |||
| 4277 | PyObject *capi_keywds, | |||
| 4278 | void (*f2py_func)(F_INTint*,float*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 4279 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 4280 | volatile int f2py_success = 1; | |||
| 4281 | /*decl*/ | |||
| 4282 | ||||
| 4283 | int n = 0; | |||
| 4284 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 4285 | float a = 0; | |||
| 4286 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 4287 | float *x = NULL((void*)0); | |||
| 4288 | npy_intp x_Dims[1] = {-1}; | |||
| 4289 | const int x_Rank = 1; | |||
| 4290 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 4291 | int capi_x_intent = 0; | |||
| 4292 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 4293 | int offx = 0; | |||
| 4294 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 4295 | int incx = 0; | |||
| 4296 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 4297 | float *y = NULL((void*)0); | |||
| 4298 | npy_intp y_Dims[1] = {-1}; | |||
| 4299 | const int y_Rank = 1; | |||
| 4300 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 4301 | int capi_y_intent = 0; | |||
| 4302 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 4303 | int offy = 0; | |||
| 4304 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 4305 | int incy = 0; | |||
| 4306 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 4307 | static char *capi_kwlist[] = {"x","y","n","a","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 4308 | ||||
| 4309 | /*routdebugenter*/ | |||
| 4310 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4311 | f2py_start_clock(); | |||
| 4312 | #endif | |||
| 4313 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 4314 | "OO|OOOOOO:_fblas.saxpy",\ | |||
| 4315 | capi_kwlist,&x_capi,&y_capi,&n_capi,&a_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 4316 | return NULL((void*)0); | |||
| 4317 | /*frompyobj*/ | |||
| 4318 | /* Processing variable x */ | |||
| 4319 | ; | |||
| 4320 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 4321 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 4322 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 4323 | if (!PyErr_Occurred()) | |||
| 4324 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.saxpy to C/Fortran array" ); | |||
| 4325 | } else { | |||
| 4326 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 4327 | ||||
| 4328 | /* Processing variable y */ | |||
| 4329 | ; | |||
| 4330 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 4331 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 4332 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 4333 | if (!PyErr_Occurred()) | |||
| 4334 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.saxpy to C/Fortran array" ); | |||
| 4335 | } else { | |||
| 4336 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 4337 | ||||
| 4338 | /* Processing variable a */ | |||
| 4339 | if (a_capi == Py_None(&_Py_NoneStruct)) a = 1.0; else | |||
| 4340 | f2py_success = float_from_pyobj(&a,a_capi,"_fblas.saxpy() 2nd keyword (a) can't be converted to float"); | |||
| 4341 | if (f2py_success) { | |||
| 4342 | /* Processing variable incx */ | |||
| 4343 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 4344 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.saxpy() 4th keyword (incx) can't be converted to int"); | |||
| 4345 | if (f2py_success) { | |||
| 4346 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","saxpy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""saxpy:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4347 | /* Processing variable incy */ | |||
| 4348 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 4349 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.saxpy() 6th keyword (incy) can't be converted to int"); | |||
| 4350 | if (f2py_success) { | |||
| 4351 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","saxpy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""saxpy:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4352 | /* Processing variable offx */ | |||
| 4353 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 4354 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.saxpy() 3rd keyword (offx) can't be converted to int"); | |||
| 4355 | if (f2py_success) { | |||
| 4356 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd keyword offx","saxpy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""saxpy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""3rd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4357 | /* Processing variable offy */ | |||
| 4358 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 4359 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.saxpy() 5th keyword (offy) can't be converted to int"); | |||
| 4360 | if (f2py_success) { | |||
| 4361 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","5th keyword offy","saxpy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""saxpy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""5th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4362 | /* Processing variable n */ | |||
| 4363 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 4364 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.saxpy() 1st keyword (n) can't be converted to int"); | |||
| 4365 | if (f2py_success) { | |||
| 4366 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","saxpy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""saxpy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4367 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","saxpy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""saxpy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4368 | /*end of frompyobj*/ | |||
| 4369 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4370 | f2py_start_call_clock(); | |||
| 4371 | #endif | |||
| 4372 | /*callfortranroutine*/ | |||
| 4373 | (*f2py_func)(&n,&a,x+offx,&incx,y+offy,&incy) ; | |||
| 4374 | /*(*f2py_func)(&n,&a,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 4375 | if (PyErr_Occurred()) | |||
| 4376 | f2py_success = 0; | |||
| 4377 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4378 | f2py_stop_call_clock(); | |||
| 4379 | #endif | |||
| 4380 | /*end of callfortranroutine*/ | |||
| 4381 | if (f2py_success) { | |||
| 4382 | /*pyobjfrom*/ | |||
| 4383 | /*end of pyobjfrom*/ | |||
| 4384 | CFUNCSMESS("Building return value.\n"); | |||
| 4385 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 4386 | /*closepyobjfrom*/ | |||
| 4387 | /*end of closepyobjfrom*/ | |||
| 4388 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 4389 | /*cleanupfrompyobj*/ | |||
| 4390 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 4391 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 4392 | } /*if (f2py_success) of n*/ | |||
| 4393 | /* End of cleaning variable n */ | |||
| 4394 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 4395 | } /*if (f2py_success) of offy*/ | |||
| 4396 | /* End of cleaning variable offy */ | |||
| 4397 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 4398 | } /*if (f2py_success) of offx*/ | |||
| 4399 | /* End of cleaning variable offx */ | |||
| 4400 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 4401 | } /*if (f2py_success) of incy*/ | |||
| 4402 | /* End of cleaning variable incy */ | |||
| 4403 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 4404 | } /*if (f2py_success) of incx*/ | |||
| 4405 | /* End of cleaning variable incx */ | |||
| 4406 | } /*if (f2py_success) of a*/ | |||
| 4407 | /* End of cleaning variable a */ | |||
| 4408 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 4409 | /* End of cleaning variable y */ | |||
| 4410 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 4411 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 4412 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 4413 | /* End of cleaning variable x */ | |||
| 4414 | /*end of cleanupfrompyobj*/ | |||
| 4415 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 4416 | /*routdebugfailure*/ | |||
| 4417 | } else { | |||
| 4418 | /*routdebugleave*/ | |||
| 4419 | } | |||
| 4420 | CFUNCSMESS("Freeing memory.\n"); | |||
| 4421 | /*freemem*/ | |||
| 4422 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4423 | f2py_stop_clock(); | |||
| 4424 | #endif | |||
| 4425 | return capi_buildvalue; | |||
| 4426 | } | |||
| 4427 | /******************************** end of saxpy ********************************/ | |||
| 4428 | ||||
| 4429 | /*********************************** daxpy ***********************************/ | |||
| 4430 | static char doc_f2py_rout__fblas_daxpy[] = "\ | |||
| 4431 | z = daxpy(x,y,[n,a,offx,incx,offy,incy])\n\nWrapper for ``daxpy``.\ | |||
| 4432 | \n\nParameters\n----------\n" | |||
| 4433 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 4434 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 4435 | "\nOther Parameters\n----------------\n" | |||
| 4436 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 4437 | "a : input float, optional\n Default: 1.0\n" | |||
| 4438 | "offx : input int, optional\n Default: 0\n" | |||
| 4439 | "incx : input int, optional\n Default: 1\n" | |||
| 4440 | "offy : input int, optional\n Default: 0\n" | |||
| 4441 | "incy : input int, optional\n Default: 1\n" | |||
| 4442 | "\nReturns\n-------\n" | |||
| 4443 | "z : rank-1 array('d') with bounds (*) and y storage"; | |||
| 4444 | /* extern void F_FUNC(daxpy,DAXPY)(F_INT*,double*,double*,F_INT*,double*,F_INT* ); */ | |||
| 4445 | static PyObject *f2py_rout__fblas_daxpy(const PyObject *capi_self, | |||
| 4446 | PyObject *capi_args, | |||
| 4447 | PyObject *capi_keywds, | |||
| 4448 | void (*f2py_func)(F_INTint*,double*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 4449 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 4450 | volatile int f2py_success = 1; | |||
| 4451 | /*decl*/ | |||
| 4452 | ||||
| 4453 | int n = 0; | |||
| 4454 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 4455 | double a = 0; | |||
| 4456 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 4457 | double *x = NULL((void*)0); | |||
| 4458 | npy_intp x_Dims[1] = {-1}; | |||
| 4459 | const int x_Rank = 1; | |||
| 4460 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 4461 | int capi_x_intent = 0; | |||
| 4462 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 4463 | int offx = 0; | |||
| 4464 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 4465 | int incx = 0; | |||
| 4466 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 4467 | double *y = NULL((void*)0); | |||
| 4468 | npy_intp y_Dims[1] = {-1}; | |||
| 4469 | const int y_Rank = 1; | |||
| 4470 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 4471 | int capi_y_intent = 0; | |||
| 4472 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 4473 | int offy = 0; | |||
| 4474 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 4475 | int incy = 0; | |||
| 4476 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 4477 | static char *capi_kwlist[] = {"x","y","n","a","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 4478 | ||||
| 4479 | /*routdebugenter*/ | |||
| 4480 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4481 | f2py_start_clock(); | |||
| 4482 | #endif | |||
| 4483 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 4484 | "OO|OOOOOO:_fblas.daxpy",\ | |||
| 4485 | capi_kwlist,&x_capi,&y_capi,&n_capi,&a_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 4486 | return NULL((void*)0); | |||
| 4487 | /*frompyobj*/ | |||
| 4488 | /* Processing variable x */ | |||
| 4489 | ; | |||
| 4490 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 4491 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 4492 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 4493 | if (!PyErr_Occurred()) | |||
| 4494 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.daxpy to C/Fortran array" ); | |||
| 4495 | } else { | |||
| 4496 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 4497 | ||||
| 4498 | /* Processing variable y */ | |||
| 4499 | ; | |||
| 4500 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 4501 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 4502 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 4503 | if (!PyErr_Occurred()) | |||
| 4504 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.daxpy to C/Fortran array" ); | |||
| 4505 | } else { | |||
| 4506 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 4507 | ||||
| 4508 | /* Processing variable a */ | |||
| 4509 | if (a_capi == Py_None(&_Py_NoneStruct)) a = 1.0; else | |||
| 4510 | f2py_success = double_from_pyobj(&a,a_capi,"_fblas.daxpy() 2nd keyword (a) can't be converted to double"); | |||
| 4511 | if (f2py_success) { | |||
| 4512 | /* Processing variable incx */ | |||
| 4513 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 4514 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.daxpy() 4th keyword (incx) can't be converted to int"); | |||
| 4515 | if (f2py_success) { | |||
| 4516 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","daxpy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""daxpy:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4517 | /* Processing variable incy */ | |||
| 4518 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 4519 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.daxpy() 6th keyword (incy) can't be converted to int"); | |||
| 4520 | if (f2py_success) { | |||
| 4521 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","daxpy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""daxpy:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4522 | /* Processing variable offx */ | |||
| 4523 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 4524 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.daxpy() 3rd keyword (offx) can't be converted to int"); | |||
| 4525 | if (f2py_success) { | |||
| 4526 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd keyword offx","daxpy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""daxpy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""3rd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4527 | /* Processing variable offy */ | |||
| 4528 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 4529 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.daxpy() 5th keyword (offy) can't be converted to int"); | |||
| 4530 | if (f2py_success) { | |||
| 4531 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","5th keyword offy","daxpy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""daxpy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""5th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4532 | /* Processing variable n */ | |||
| 4533 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 4534 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.daxpy() 1st keyword (n) can't be converted to int"); | |||
| 4535 | if (f2py_success) { | |||
| 4536 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","daxpy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""daxpy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4537 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","daxpy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""daxpy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4538 | /*end of frompyobj*/ | |||
| 4539 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4540 | f2py_start_call_clock(); | |||
| 4541 | #endif | |||
| 4542 | /*callfortranroutine*/ | |||
| 4543 | (*f2py_func)(&n,&a,x+offx,&incx,y+offy,&incy) ; | |||
| 4544 | /*(*f2py_func)(&n,&a,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 4545 | if (PyErr_Occurred()) | |||
| 4546 | f2py_success = 0; | |||
| 4547 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4548 | f2py_stop_call_clock(); | |||
| 4549 | #endif | |||
| 4550 | /*end of callfortranroutine*/ | |||
| 4551 | if (f2py_success) { | |||
| 4552 | /*pyobjfrom*/ | |||
| 4553 | /*end of pyobjfrom*/ | |||
| 4554 | CFUNCSMESS("Building return value.\n"); | |||
| 4555 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 4556 | /*closepyobjfrom*/ | |||
| 4557 | /*end of closepyobjfrom*/ | |||
| 4558 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 4559 | /*cleanupfrompyobj*/ | |||
| 4560 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 4561 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 4562 | } /*if (f2py_success) of n*/ | |||
| 4563 | /* End of cleaning variable n */ | |||
| 4564 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 4565 | } /*if (f2py_success) of offy*/ | |||
| 4566 | /* End of cleaning variable offy */ | |||
| 4567 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 4568 | } /*if (f2py_success) of offx*/ | |||
| 4569 | /* End of cleaning variable offx */ | |||
| 4570 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 4571 | } /*if (f2py_success) of incy*/ | |||
| 4572 | /* End of cleaning variable incy */ | |||
| 4573 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 4574 | } /*if (f2py_success) of incx*/ | |||
| 4575 | /* End of cleaning variable incx */ | |||
| 4576 | } /*if (f2py_success) of a*/ | |||
| 4577 | /* End of cleaning variable a */ | |||
| 4578 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 4579 | /* End of cleaning variable y */ | |||
| 4580 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 4581 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 4582 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 4583 | /* End of cleaning variable x */ | |||
| 4584 | /*end of cleanupfrompyobj*/ | |||
| 4585 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 4586 | /*routdebugfailure*/ | |||
| 4587 | } else { | |||
| 4588 | /*routdebugleave*/ | |||
| 4589 | } | |||
| 4590 | CFUNCSMESS("Freeing memory.\n"); | |||
| 4591 | /*freemem*/ | |||
| 4592 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4593 | f2py_stop_clock(); | |||
| 4594 | #endif | |||
| 4595 | return capi_buildvalue; | |||
| 4596 | } | |||
| 4597 | /******************************** end of daxpy ********************************/ | |||
| 4598 | ||||
| 4599 | /*********************************** caxpy ***********************************/ | |||
| 4600 | static char doc_f2py_rout__fblas_caxpy[] = "\ | |||
| 4601 | z = caxpy(x,y,[n,a,offx,incx,offy,incy])\n\nWrapper for ``caxpy``.\ | |||
| 4602 | \n\nParameters\n----------\n" | |||
| 4603 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 4604 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 4605 | "\nOther Parameters\n----------------\n" | |||
| 4606 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 4607 | "a : input complex, optional\n Default: (1.0, 0.0)\n" | |||
| 4608 | "offx : input int, optional\n Default: 0\n" | |||
| 4609 | "incx : input int, optional\n Default: 1\n" | |||
| 4610 | "offy : input int, optional\n Default: 0\n" | |||
| 4611 | "incy : input int, optional\n Default: 1\n" | |||
| 4612 | "\nReturns\n-------\n" | |||
| 4613 | "z : rank-1 array('F') with bounds (*) and y storage"; | |||
| 4614 | /* extern void F_FUNC(caxpy,CAXPY)(F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 4615 | static PyObject *f2py_rout__fblas_caxpy(const PyObject *capi_self, | |||
| 4616 | PyObject *capi_args, | |||
| 4617 | PyObject *capi_keywds, | |||
| 4618 | void (*f2py_func)(F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 4619 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 4620 | volatile int f2py_success = 1; | |||
| 4621 | /*decl*/ | |||
| 4622 | ||||
| 4623 | int n = 0; | |||
| 4624 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 4625 | complex_float a; | |||
| 4626 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 4627 | complex_float *x = NULL((void*)0); | |||
| 4628 | npy_intp x_Dims[1] = {-1}; | |||
| 4629 | const int x_Rank = 1; | |||
| 4630 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 4631 | int capi_x_intent = 0; | |||
| 4632 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 4633 | int offx = 0; | |||
| 4634 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 4635 | int incx = 0; | |||
| 4636 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 4637 | complex_float *y = NULL((void*)0); | |||
| 4638 | npy_intp y_Dims[1] = {-1}; | |||
| 4639 | const int y_Rank = 1; | |||
| 4640 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 4641 | int capi_y_intent = 0; | |||
| 4642 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 4643 | int offy = 0; | |||
| 4644 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 4645 | int incy = 0; | |||
| 4646 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 4647 | static char *capi_kwlist[] = {"x","y","n","a","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 4648 | ||||
| 4649 | /*routdebugenter*/ | |||
| 4650 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4651 | f2py_start_clock(); | |||
| 4652 | #endif | |||
| 4653 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 4654 | "OO|OOOOOO:_fblas.caxpy",\ | |||
| 4655 | capi_kwlist,&x_capi,&y_capi,&n_capi,&a_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 4656 | return NULL((void*)0); | |||
| 4657 | /*frompyobj*/ | |||
| 4658 | /* Processing variable x */ | |||
| 4659 | ; | |||
| 4660 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 4661 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 4662 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 4663 | if (!PyErr_Occurred()) | |||
| 4664 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.caxpy to C/Fortran array" ); | |||
| 4665 | } else { | |||
| 4666 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 4667 | ||||
| 4668 | /* Processing variable y */ | |||
| 4669 | ; | |||
| 4670 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 4671 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 4672 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 4673 | if (!PyErr_Occurred()) | |||
| 4674 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.caxpy to C/Fortran array" ); | |||
| 4675 | } else { | |||
| 4676 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 4677 | ||||
| 4678 | /* Processing variable a */ | |||
| 4679 | if (a_capi==Py_None(&_Py_NoneStruct)) {a.r = 1.0, a.i = 0.0;} else | |||
| 4680 | f2py_success = complex_float_from_pyobj(&a,a_capi,"_fblas.caxpy() 2nd keyword (a) can't be converted to complex_float"); | |||
| 4681 | if (f2py_success) { | |||
| 4682 | /* Processing variable incx */ | |||
| 4683 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 4684 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.caxpy() 4th keyword (incx) can't be converted to int"); | |||
| 4685 | if (f2py_success) { | |||
| 4686 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","caxpy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""caxpy:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4687 | /* Processing variable incy */ | |||
| 4688 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 4689 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.caxpy() 6th keyword (incy) can't be converted to int"); | |||
| 4690 | if (f2py_success) { | |||
| 4691 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","caxpy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""caxpy:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4692 | /* Processing variable offx */ | |||
| 4693 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 4694 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.caxpy() 3rd keyword (offx) can't be converted to int"); | |||
| 4695 | if (f2py_success) { | |||
| 4696 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd keyword offx","caxpy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""caxpy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""3rd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4697 | /* Processing variable offy */ | |||
| 4698 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 4699 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.caxpy() 5th keyword (offy) can't be converted to int"); | |||
| 4700 | if (f2py_success) { | |||
| 4701 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","5th keyword offy","caxpy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""caxpy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""5th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4702 | /* Processing variable n */ | |||
| 4703 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 4704 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.caxpy() 1st keyword (n) can't be converted to int"); | |||
| 4705 | if (f2py_success) { | |||
| 4706 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","caxpy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""caxpy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4707 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","caxpy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""caxpy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4708 | /*end of frompyobj*/ | |||
| 4709 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4710 | f2py_start_call_clock(); | |||
| 4711 | #endif | |||
| 4712 | /*callfortranroutine*/ | |||
| 4713 | (*f2py_func)(&n,&a,x+offx,&incx,y+offy,&incy) ; | |||
| 4714 | /*(*f2py_func)(&n,&a,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 4715 | if (PyErr_Occurred()) | |||
| 4716 | f2py_success = 0; | |||
| 4717 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4718 | f2py_stop_call_clock(); | |||
| 4719 | #endif | |||
| 4720 | /*end of callfortranroutine*/ | |||
| 4721 | if (f2py_success) { | |||
| 4722 | /*pyobjfrom*/ | |||
| 4723 | /*end of pyobjfrom*/ | |||
| 4724 | CFUNCSMESS("Building return value.\n"); | |||
| 4725 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 4726 | /*closepyobjfrom*/ | |||
| 4727 | /*end of closepyobjfrom*/ | |||
| 4728 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 4729 | /*cleanupfrompyobj*/ | |||
| 4730 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 4731 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 4732 | } /*if (f2py_success) of n*/ | |||
| 4733 | /* End of cleaning variable n */ | |||
| 4734 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 4735 | } /*if (f2py_success) of offy*/ | |||
| 4736 | /* End of cleaning variable offy */ | |||
| 4737 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 4738 | } /*if (f2py_success) of offx*/ | |||
| 4739 | /* End of cleaning variable offx */ | |||
| 4740 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 4741 | } /*if (f2py_success) of incy*/ | |||
| 4742 | /* End of cleaning variable incy */ | |||
| 4743 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 4744 | } /*if (f2py_success) of incx*/ | |||
| 4745 | /* End of cleaning variable incx */ | |||
| 4746 | } /*if (f2py_success) of a frompyobj*/ | |||
| 4747 | /* End of cleaning variable a */ | |||
| 4748 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 4749 | /* End of cleaning variable y */ | |||
| 4750 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 4751 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 4752 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 4753 | /* End of cleaning variable x */ | |||
| 4754 | /*end of cleanupfrompyobj*/ | |||
| 4755 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 4756 | /*routdebugfailure*/ | |||
| 4757 | } else { | |||
| 4758 | /*routdebugleave*/ | |||
| 4759 | } | |||
| 4760 | CFUNCSMESS("Freeing memory.\n"); | |||
| 4761 | /*freemem*/ | |||
| 4762 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4763 | f2py_stop_clock(); | |||
| 4764 | #endif | |||
| 4765 | return capi_buildvalue; | |||
| 4766 | } | |||
| 4767 | /******************************** end of caxpy ********************************/ | |||
| 4768 | ||||
| 4769 | /*********************************** zaxpy ***********************************/ | |||
| 4770 | static char doc_f2py_rout__fblas_zaxpy[] = "\ | |||
| 4771 | z = zaxpy(x,y,[n,a,offx,incx,offy,incy])\n\nWrapper for ``zaxpy``.\ | |||
| 4772 | \n\nParameters\n----------\n" | |||
| 4773 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 4774 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 4775 | "\nOther Parameters\n----------------\n" | |||
| 4776 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 4777 | "a : input complex, optional\n Default: (1.0, 0.0)\n" | |||
| 4778 | "offx : input int, optional\n Default: 0\n" | |||
| 4779 | "incx : input int, optional\n Default: 1\n" | |||
| 4780 | "offy : input int, optional\n Default: 0\n" | |||
| 4781 | "incy : input int, optional\n Default: 1\n" | |||
| 4782 | "\nReturns\n-------\n" | |||
| 4783 | "z : rank-1 array('D') with bounds (*) and y storage"; | |||
| 4784 | /* extern void F_FUNC(zaxpy,ZAXPY)(F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 4785 | static PyObject *f2py_rout__fblas_zaxpy(const PyObject *capi_self, | |||
| 4786 | PyObject *capi_args, | |||
| 4787 | PyObject *capi_keywds, | |||
| 4788 | void (*f2py_func)(F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 4789 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 4790 | volatile int f2py_success = 1; | |||
| 4791 | /*decl*/ | |||
| 4792 | ||||
| 4793 | int n = 0; | |||
| 4794 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 4795 | complex_double a; | |||
| 4796 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 4797 | complex_double *x = NULL((void*)0); | |||
| 4798 | npy_intp x_Dims[1] = {-1}; | |||
| 4799 | const int x_Rank = 1; | |||
| 4800 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 4801 | int capi_x_intent = 0; | |||
| 4802 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 4803 | int offx = 0; | |||
| 4804 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 4805 | int incx = 0; | |||
| 4806 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 4807 | complex_double *y = NULL((void*)0); | |||
| 4808 | npy_intp y_Dims[1] = {-1}; | |||
| 4809 | const int y_Rank = 1; | |||
| 4810 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 4811 | int capi_y_intent = 0; | |||
| 4812 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 4813 | int offy = 0; | |||
| 4814 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 4815 | int incy = 0; | |||
| 4816 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 4817 | static char *capi_kwlist[] = {"x","y","n","a","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 4818 | ||||
| 4819 | /*routdebugenter*/ | |||
| 4820 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4821 | f2py_start_clock(); | |||
| 4822 | #endif | |||
| 4823 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 4824 | "OO|OOOOOO:_fblas.zaxpy",\ | |||
| 4825 | capi_kwlist,&x_capi,&y_capi,&n_capi,&a_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 4826 | return NULL((void*)0); | |||
| 4827 | /*frompyobj*/ | |||
| 4828 | /* Processing variable x */ | |||
| 4829 | ; | |||
| 4830 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 4831 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 4832 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 4833 | if (!PyErr_Occurred()) | |||
| 4834 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.zaxpy to C/Fortran array" ); | |||
| 4835 | } else { | |||
| 4836 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 4837 | ||||
| 4838 | /* Processing variable y */ | |||
| 4839 | ; | |||
| 4840 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 4841 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 4842 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 4843 | if (!PyErr_Occurred()) | |||
| 4844 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.zaxpy to C/Fortran array" ); | |||
| 4845 | } else { | |||
| 4846 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 4847 | ||||
| 4848 | /* Processing variable a */ | |||
| 4849 | if (a_capi==Py_None(&_Py_NoneStruct)) {a.r = 1.0, a.i = 0.0;} else | |||
| 4850 | f2py_success = complex_double_from_pyobj(&a,a_capi,"_fblas.zaxpy() 2nd keyword (a) can't be converted to complex_double"); | |||
| 4851 | if (f2py_success) { | |||
| 4852 | /* Processing variable incx */ | |||
| 4853 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 4854 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zaxpy() 4th keyword (incx) can't be converted to int"); | |||
| 4855 | if (f2py_success) { | |||
| 4856 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","zaxpy:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zaxpy:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4857 | /* Processing variable incy */ | |||
| 4858 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 4859 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zaxpy() 6th keyword (incy) can't be converted to int"); | |||
| 4860 | if (f2py_success) { | |||
| 4861 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","zaxpy:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zaxpy:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 4862 | /* Processing variable offx */ | |||
| 4863 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 4864 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zaxpy() 3rd keyword (offx) can't be converted to int"); | |||
| 4865 | if (f2py_success) { | |||
| 4866 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd keyword offx","zaxpy:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zaxpy:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""3rd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4867 | /* Processing variable offy */ | |||
| 4868 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 4869 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zaxpy() 5th keyword (offy) can't be converted to int"); | |||
| 4870 | if (f2py_success) { | |||
| 4871 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","5th keyword offy","zaxpy:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zaxpy:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""5th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4872 | /* Processing variable n */ | |||
| 4873 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 4874 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zaxpy() 1st keyword (n) can't be converted to int"); | |||
| 4875 | if (f2py_success) { | |||
| 4876 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","zaxpy:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zaxpy:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4877 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zaxpy:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zaxpy:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 4878 | /*end of frompyobj*/ | |||
| 4879 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4880 | f2py_start_call_clock(); | |||
| 4881 | #endif | |||
| 4882 | /*callfortranroutine*/ | |||
| 4883 | (*f2py_func)(&n,&a,x+offx,&incx,y+offy,&incy) ; | |||
| 4884 | /*(*f2py_func)(&n,&a,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 4885 | if (PyErr_Occurred()) | |||
| 4886 | f2py_success = 0; | |||
| 4887 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4888 | f2py_stop_call_clock(); | |||
| 4889 | #endif | |||
| 4890 | /*end of callfortranroutine*/ | |||
| 4891 | if (f2py_success) { | |||
| 4892 | /*pyobjfrom*/ | |||
| 4893 | /*end of pyobjfrom*/ | |||
| 4894 | CFUNCSMESS("Building return value.\n"); | |||
| 4895 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 4896 | /*closepyobjfrom*/ | |||
| 4897 | /*end of closepyobjfrom*/ | |||
| 4898 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 4899 | /*cleanupfrompyobj*/ | |||
| 4900 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 4901 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 4902 | } /*if (f2py_success) of n*/ | |||
| 4903 | /* End of cleaning variable n */ | |||
| 4904 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 4905 | } /*if (f2py_success) of offy*/ | |||
| 4906 | /* End of cleaning variable offy */ | |||
| 4907 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 4908 | } /*if (f2py_success) of offx*/ | |||
| 4909 | /* End of cleaning variable offx */ | |||
| 4910 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 4911 | } /*if (f2py_success) of incy*/ | |||
| 4912 | /* End of cleaning variable incy */ | |||
| 4913 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 4914 | } /*if (f2py_success) of incx*/ | |||
| 4915 | /* End of cleaning variable incx */ | |||
| 4916 | } /*if (f2py_success) of a frompyobj*/ | |||
| 4917 | /* End of cleaning variable a */ | |||
| 4918 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 4919 | /* End of cleaning variable y */ | |||
| 4920 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 4921 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 4922 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 4923 | /* End of cleaning variable x */ | |||
| 4924 | /*end of cleanupfrompyobj*/ | |||
| 4925 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 4926 | /*routdebugfailure*/ | |||
| 4927 | } else { | |||
| 4928 | /*routdebugleave*/ | |||
| 4929 | } | |||
| 4930 | CFUNCSMESS("Freeing memory.\n"); | |||
| 4931 | /*freemem*/ | |||
| 4932 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4933 | f2py_stop_clock(); | |||
| 4934 | #endif | |||
| 4935 | return capi_buildvalue; | |||
| 4936 | } | |||
| 4937 | /******************************** end of zaxpy ********************************/ | |||
| 4938 | ||||
| 4939 | /************************************ sdot ************************************/ | |||
| 4940 | static char doc_f2py_rout__fblas_sdot[] = "\ | |||
| 4941 | xy = sdot(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``sdot``.\ | |||
| 4942 | \n\nParameters\n----------\n" | |||
| 4943 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 4944 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 4945 | "\nOther Parameters\n----------------\n" | |||
| 4946 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 4947 | "offx : input int, optional\n Default: 0\n" | |||
| 4948 | "incx : input int, optional\n Default: 1\n" | |||
| 4949 | "offy : input int, optional\n Default: 0\n" | |||
| 4950 | "incy : input int, optional\n Default: 1\n" | |||
| 4951 | "\nReturns\n-------\n" | |||
| 4952 | "xy : float"; | |||
| 4953 | /* extern void F_WRAPPEDFUNC(sdot,SDOT)(float*,F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 4954 | static PyObject *f2py_rout__fblas_sdot(const PyObject *capi_self, | |||
| 4955 | PyObject *capi_args, | |||
| 4956 | PyObject *capi_keywds, | |||
| 4957 | void (*f2py_func)(float*,F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 4958 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 4959 | volatile int f2py_success = 1; | |||
| 4960 | /*decl*/ | |||
| 4961 | ||||
| 4962 | float sdot = 0; | |||
| 4963 | int n = 0; | |||
| 4964 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 4965 | float *x = NULL((void*)0); | |||
| 4966 | npy_intp x_Dims[1] = {-1}; | |||
| 4967 | const int x_Rank = 1; | |||
| 4968 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 4969 | int capi_x_intent = 0; | |||
| 4970 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 4971 | int offx = 0; | |||
| 4972 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 4973 | int incx = 0; | |||
| 4974 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 4975 | float *y = NULL((void*)0); | |||
| 4976 | npy_intp y_Dims[1] = {-1}; | |||
| 4977 | const int y_Rank = 1; | |||
| 4978 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 4979 | int capi_y_intent = 0; | |||
| 4980 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 4981 | int offy = 0; | |||
| 4982 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 4983 | int incy = 0; | |||
| 4984 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 4985 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 4986 | ||||
| 4987 | /*routdebugenter*/ | |||
| 4988 | #ifdef F2PY_REPORT_ATEXIT | |||
| 4989 | f2py_start_clock(); | |||
| 4990 | #endif | |||
| 4991 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 4992 | "OO|OOOOO:_fblas.sdot",\ | |||
| 4993 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 4994 | return NULL((void*)0); | |||
| 4995 | /*frompyobj*/ | |||
| 4996 | /* Processing variable x */ | |||
| 4997 | ; | |||
| 4998 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 4999 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5000 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5001 | if (!PyErr_Occurred()) | |||
| 5002 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.sdot to C/Fortran array" ); | |||
| 5003 | } else { | |||
| 5004 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5005 | ||||
| 5006 | /* Processing variable y */ | |||
| 5007 | ; | |||
| 5008 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 5009 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 5010 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 5011 | if (!PyErr_Occurred()) | |||
| 5012 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.sdot to C/Fortran array" ); | |||
| 5013 | } else { | |||
| 5014 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 5015 | ||||
| 5016 | /* Processing variable incx */ | |||
| 5017 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5018 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sdot() 3rd keyword (incx) can't be converted to int"); | |||
| 5019 | if (f2py_success) { | |||
| 5020 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","sdot:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sdot:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5021 | /* Processing variable incy */ | |||
| 5022 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 5023 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sdot() 5th keyword (incy) can't be converted to int"); | |||
| 5024 | if (f2py_success) { | |||
| 5025 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","sdot:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sdot:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5026 | /* Processing variable offx */ | |||
| 5027 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 5028 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sdot() 2nd keyword (offx) can't be converted to int"); | |||
| 5029 | if (f2py_success) { | |||
| 5030 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","sdot:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sdot:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5031 | /* Processing variable offy */ | |||
| 5032 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 5033 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.sdot() 4th keyword (offy) can't be converted to int"); | |||
| 5034 | if (f2py_success) { | |||
| 5035 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","sdot:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sdot:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5036 | /* Processing variable n */ | |||
| 5037 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 5038 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sdot() 1st keyword (n) can't be converted to int"); | |||
| 5039 | if (f2py_success) { | |||
| 5040 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","sdot:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sdot:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5041 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","sdot:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sdot:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5042 | /* Processing variable sdot */ | |||
| 5043 | /*end of frompyobj*/ | |||
| 5044 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5045 | f2py_start_call_clock(); | |||
| 5046 | #endif | |||
| 5047 | /*callfortranroutine*/ | |||
| 5048 | (*f2py_func)(&sdot,&n,x+offx,&incx,y+offy,&incy) ; | |||
| 5049 | /*(*f2py_func)(&sdot,&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 5050 | if (PyErr_Occurred()) | |||
| 5051 | f2py_success = 0; | |||
| 5052 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5053 | f2py_stop_call_clock(); | |||
| 5054 | #endif | |||
| 5055 | /*end of callfortranroutine*/ | |||
| 5056 | if (f2py_success) { | |||
| 5057 | /*pyobjfrom*/ | |||
| 5058 | /*end of pyobjfrom*/ | |||
| 5059 | CFUNCSMESS("Building return value.\n"); | |||
| 5060 | capi_buildvalue = Py_BuildValue("f",sdot); | |||
| 5061 | /*closepyobjfrom*/ | |||
| 5062 | /*end of closepyobjfrom*/ | |||
| 5063 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 5064 | /*cleanupfrompyobj*/ | |||
| 5065 | /* End of cleaning variable sdot */ | |||
| 5066 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 5067 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 5068 | } /*if (f2py_success) of n*/ | |||
| 5069 | /* End of cleaning variable n */ | |||
| 5070 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 5071 | } /*if (f2py_success) of offy*/ | |||
| 5072 | /* End of cleaning variable offy */ | |||
| 5073 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 5074 | } /*if (f2py_success) of offx*/ | |||
| 5075 | /* End of cleaning variable offx */ | |||
| 5076 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 5077 | } /*if (f2py_success) of incy*/ | |||
| 5078 | /* End of cleaning variable incy */ | |||
| 5079 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 5080 | } /*if (f2py_success) of incx*/ | |||
| 5081 | /* End of cleaning variable incx */ | |||
| 5082 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 5083 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 5084 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 5085 | /* End of cleaning variable y */ | |||
| 5086 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 5087 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 5088 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 5089 | /* End of cleaning variable x */ | |||
| 5090 | /*end of cleanupfrompyobj*/ | |||
| 5091 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 5092 | /*routdebugfailure*/ | |||
| 5093 | } else { | |||
| 5094 | /*routdebugleave*/ | |||
| 5095 | } | |||
| 5096 | CFUNCSMESS("Freeing memory.\n"); | |||
| 5097 | /*freemem*/ | |||
| 5098 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5099 | f2py_stop_clock(); | |||
| 5100 | #endif | |||
| 5101 | return capi_buildvalue; | |||
| 5102 | } | |||
| 5103 | /******************************** end of sdot ********************************/ | |||
| 5104 | ||||
| 5105 | /************************************ ddot ************************************/ | |||
| 5106 | static char doc_f2py_rout__fblas_ddot[] = "\ | |||
| 5107 | xy = ddot(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``ddot``.\ | |||
| 5108 | \n\nParameters\n----------\n" | |||
| 5109 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 5110 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 5111 | "\nOther Parameters\n----------------\n" | |||
| 5112 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 5113 | "offx : input int, optional\n Default: 0\n" | |||
| 5114 | "incx : input int, optional\n Default: 1\n" | |||
| 5115 | "offy : input int, optional\n Default: 0\n" | |||
| 5116 | "incy : input int, optional\n Default: 1\n" | |||
| 5117 | "\nReturns\n-------\n" | |||
| 5118 | "xy : float"; | |||
| 5119 | /* extern void F_WRAPPEDFUNC(ddot,DDOT)(double*,F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 5120 | static PyObject *f2py_rout__fblas_ddot(const PyObject *capi_self, | |||
| 5121 | PyObject *capi_args, | |||
| 5122 | PyObject *capi_keywds, | |||
| 5123 | void (*f2py_func)(double*,F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 5124 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 5125 | volatile int f2py_success = 1; | |||
| 5126 | /*decl*/ | |||
| 5127 | ||||
| 5128 | double ddot = 0; | |||
| 5129 | int n = 0; | |||
| 5130 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 5131 | double *x = NULL((void*)0); | |||
| 5132 | npy_intp x_Dims[1] = {-1}; | |||
| 5133 | const int x_Rank = 1; | |||
| 5134 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 5135 | int capi_x_intent = 0; | |||
| 5136 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 5137 | int offx = 0; | |||
| 5138 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 5139 | int incx = 0; | |||
| 5140 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 5141 | double *y = NULL((void*)0); | |||
| 5142 | npy_intp y_Dims[1] = {-1}; | |||
| 5143 | const int y_Rank = 1; | |||
| 5144 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 5145 | int capi_y_intent = 0; | |||
| 5146 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 5147 | int offy = 0; | |||
| 5148 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 5149 | int incy = 0; | |||
| 5150 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 5151 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 5152 | ||||
| 5153 | /*routdebugenter*/ | |||
| 5154 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5155 | f2py_start_clock(); | |||
| 5156 | #endif | |||
| 5157 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 5158 | "OO|OOOOO:_fblas.ddot",\ | |||
| 5159 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 5160 | return NULL((void*)0); | |||
| 5161 | /*frompyobj*/ | |||
| 5162 | /* Processing variable x */ | |||
| 5163 | ; | |||
| 5164 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 5165 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5166 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5167 | if (!PyErr_Occurred()) | |||
| 5168 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.ddot to C/Fortran array" ); | |||
| 5169 | } else { | |||
| 5170 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5171 | ||||
| 5172 | /* Processing variable y */ | |||
| 5173 | ; | |||
| 5174 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 5175 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 5176 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 5177 | if (!PyErr_Occurred()) | |||
| 5178 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.ddot to C/Fortran array" ); | |||
| 5179 | } else { | |||
| 5180 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 5181 | ||||
| 5182 | /* Processing variable incx */ | |||
| 5183 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5184 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ddot() 3rd keyword (incx) can't be converted to int"); | |||
| 5185 | if (f2py_success) { | |||
| 5186 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","ddot:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ddot:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5187 | /* Processing variable incy */ | |||
| 5188 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 5189 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.ddot() 5th keyword (incy) can't be converted to int"); | |||
| 5190 | if (f2py_success) { | |||
| 5191 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","ddot:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ddot:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5192 | /* Processing variable offx */ | |||
| 5193 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 5194 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ddot() 2nd keyword (offx) can't be converted to int"); | |||
| 5195 | if (f2py_success) { | |||
| 5196 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","ddot:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ddot:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5197 | /* Processing variable offy */ | |||
| 5198 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 5199 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.ddot() 4th keyword (offy) can't be converted to int"); | |||
| 5200 | if (f2py_success) { | |||
| 5201 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","ddot:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ddot:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5202 | /* Processing variable n */ | |||
| 5203 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 5204 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ddot() 1st keyword (n) can't be converted to int"); | |||
| 5205 | if (f2py_success) { | |||
| 5206 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","ddot:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ddot:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5207 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","ddot:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ddot:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5208 | /* Processing variable ddot */ | |||
| 5209 | /*end of frompyobj*/ | |||
| 5210 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5211 | f2py_start_call_clock(); | |||
| 5212 | #endif | |||
| 5213 | /*callfortranroutine*/ | |||
| 5214 | (*f2py_func)(&ddot,&n,x+offx,&incx,y+offy,&incy) ; | |||
| 5215 | /*(*f2py_func)(&ddot,&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 5216 | if (PyErr_Occurred()) | |||
| 5217 | f2py_success = 0; | |||
| 5218 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5219 | f2py_stop_call_clock(); | |||
| 5220 | #endif | |||
| 5221 | /*end of callfortranroutine*/ | |||
| 5222 | if (f2py_success) { | |||
| 5223 | /*pyobjfrom*/ | |||
| 5224 | /*end of pyobjfrom*/ | |||
| 5225 | CFUNCSMESS("Building return value.\n"); | |||
| 5226 | capi_buildvalue = Py_BuildValue("d",ddot); | |||
| 5227 | /*closepyobjfrom*/ | |||
| 5228 | /*end of closepyobjfrom*/ | |||
| 5229 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 5230 | /*cleanupfrompyobj*/ | |||
| 5231 | /* End of cleaning variable ddot */ | |||
| 5232 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 5233 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 5234 | } /*if (f2py_success) of n*/ | |||
| 5235 | /* End of cleaning variable n */ | |||
| 5236 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 5237 | } /*if (f2py_success) of offy*/ | |||
| 5238 | /* End of cleaning variable offy */ | |||
| 5239 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 5240 | } /*if (f2py_success) of offx*/ | |||
| 5241 | /* End of cleaning variable offx */ | |||
| 5242 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 5243 | } /*if (f2py_success) of incy*/ | |||
| 5244 | /* End of cleaning variable incy */ | |||
| 5245 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 5246 | } /*if (f2py_success) of incx*/ | |||
| 5247 | /* End of cleaning variable incx */ | |||
| 5248 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 5249 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 5250 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 5251 | /* End of cleaning variable y */ | |||
| 5252 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 5253 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 5254 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 5255 | /* End of cleaning variable x */ | |||
| 5256 | /*end of cleanupfrompyobj*/ | |||
| 5257 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 5258 | /*routdebugfailure*/ | |||
| 5259 | } else { | |||
| 5260 | /*routdebugleave*/ | |||
| 5261 | } | |||
| 5262 | CFUNCSMESS("Freeing memory.\n"); | |||
| 5263 | /*freemem*/ | |||
| 5264 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5265 | f2py_stop_clock(); | |||
| 5266 | #endif | |||
| 5267 | return capi_buildvalue; | |||
| 5268 | } | |||
| 5269 | /******************************** end of ddot ********************************/ | |||
| 5270 | ||||
| 5271 | /*********************************** cdotu ***********************************/ | |||
| 5272 | static char doc_f2py_rout__fblas_cdotu[] = "\ | |||
| 5273 | xy = cdotu(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``cdotu``.\ | |||
| 5274 | \n\nParameters\n----------\n" | |||
| 5275 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 5276 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 5277 | "\nOther Parameters\n----------------\n" | |||
| 5278 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 5279 | "offx : input int, optional\n Default: 0\n" | |||
| 5280 | "incx : input int, optional\n Default: 1\n" | |||
| 5281 | "offy : input int, optional\n Default: 0\n" | |||
| 5282 | "incy : input int, optional\n Default: 1\n" | |||
| 5283 | "\nReturns\n-------\n" | |||
| 5284 | "xy : complex"; | |||
| 5285 | /* extern void F_WRAPPEDFUNC(cdotu,CDOTU)(complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 5286 | static PyObject *f2py_rout__fblas_cdotu(const PyObject *capi_self, | |||
| 5287 | PyObject *capi_args, | |||
| 5288 | PyObject *capi_keywds, | |||
| 5289 | void (*f2py_func)(complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 5290 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 5291 | volatile int f2py_success = 1; | |||
| 5292 | /*decl*/ | |||
| 5293 | ||||
| 5294 | complex_float cdotu; | |||
| 5295 | PyObject *cdotu_capi = Py_None(&_Py_NoneStruct); | |||
| 5296 | int n = 0; | |||
| 5297 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 5298 | complex_float *x = NULL((void*)0); | |||
| 5299 | npy_intp x_Dims[1] = {-1}; | |||
| 5300 | const int x_Rank = 1; | |||
| 5301 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 5302 | int capi_x_intent = 0; | |||
| 5303 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 5304 | int offx = 0; | |||
| 5305 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 5306 | int incx = 0; | |||
| 5307 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 5308 | complex_float *y = NULL((void*)0); | |||
| 5309 | npy_intp y_Dims[1] = {-1}; | |||
| 5310 | const int y_Rank = 1; | |||
| 5311 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 5312 | int capi_y_intent = 0; | |||
| 5313 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 5314 | int offy = 0; | |||
| 5315 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 5316 | int incy = 0; | |||
| 5317 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 5318 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 5319 | ||||
| 5320 | /*routdebugenter*/ | |||
| 5321 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5322 | f2py_start_clock(); | |||
| 5323 | #endif | |||
| 5324 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 5325 | "OO|OOOOO:_fblas.cdotu",\ | |||
| 5326 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 5327 | return NULL((void*)0); | |||
| 5328 | /*frompyobj*/ | |||
| 5329 | /* Processing variable x */ | |||
| 5330 | ; | |||
| 5331 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 5332 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5333 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5334 | if (!PyErr_Occurred()) | |||
| 5335 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.cdotu to C/Fortran array" ); | |||
| 5336 | } else { | |||
| 5337 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5338 | ||||
| 5339 | /* Processing variable y */ | |||
| 5340 | ; | |||
| 5341 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 5342 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 5343 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 5344 | if (!PyErr_Occurred()) | |||
| 5345 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.cdotu to C/Fortran array" ); | |||
| 5346 | } else { | |||
| 5347 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 5348 | ||||
| 5349 | /* Processing variable incx */ | |||
| 5350 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5351 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cdotu() 3rd keyword (incx) can't be converted to int"); | |||
| 5352 | if (f2py_success) { | |||
| 5353 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","cdotu:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cdotu:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5354 | /* Processing variable incy */ | |||
| 5355 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 5356 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cdotu() 5th keyword (incy) can't be converted to int"); | |||
| 5357 | if (f2py_success) { | |||
| 5358 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","cdotu:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cdotu:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5359 | /* Processing variable offx */ | |||
| 5360 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 5361 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cdotu() 2nd keyword (offx) can't be converted to int"); | |||
| 5362 | if (f2py_success) { | |||
| 5363 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","cdotu:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotu:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5364 | /* Processing variable offy */ | |||
| 5365 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 5366 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cdotu() 4th keyword (offy) can't be converted to int"); | |||
| 5367 | if (f2py_success) { | |||
| 5368 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","cdotu:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotu:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5369 | /* Processing variable n */ | |||
| 5370 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 5371 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cdotu() 1st keyword (n) can't be converted to int"); | |||
| 5372 | if (f2py_success) { | |||
| 5373 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","cdotu:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotu:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5374 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","cdotu:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotu:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5375 | /* Processing variable cdotu */ | |||
| 5376 | /*end of frompyobj*/ | |||
| 5377 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5378 | f2py_start_call_clock(); | |||
| 5379 | #endif | |||
| 5380 | /*callfortranroutine*/ | |||
| 5381 | (*f2py_func)(&cdotu,&n,x+offx,&incx,y+offy,&incy) ; | |||
| 5382 | /*(*f2py_func)(&cdotu,&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 5383 | if (PyErr_Occurred()) | |||
| 5384 | f2py_success = 0; | |||
| 5385 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5386 | f2py_stop_call_clock(); | |||
| 5387 | #endif | |||
| 5388 | /*end of callfortranroutine*/ | |||
| 5389 | if (f2py_success) { | |||
| 5390 | /*pyobjfrom*/ | |||
| 5391 | cdotu_capi = pyobj_from_complex_float1(cdotu)(PyComplex_FromDoubles(cdotu.r,cdotu.i)); | |||
| 5392 | /*end of pyobjfrom*/ | |||
| 5393 | CFUNCSMESS("Building return value.\n"); | |||
| 5394 | capi_buildvalue = Py_BuildValue("N",cdotu_capi); | |||
| 5395 | /*closepyobjfrom*/ | |||
| 5396 | /*end of closepyobjfrom*/ | |||
| 5397 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 5398 | /*cleanupfrompyobj*/ | |||
| 5399 | /* End of cleaning variable cdotu */ | |||
| 5400 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 5401 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 5402 | } /*if (f2py_success) of n*/ | |||
| 5403 | /* End of cleaning variable n */ | |||
| 5404 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 5405 | } /*if (f2py_success) of offy*/ | |||
| 5406 | /* End of cleaning variable offy */ | |||
| 5407 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 5408 | } /*if (f2py_success) of offx*/ | |||
| 5409 | /* End of cleaning variable offx */ | |||
| 5410 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 5411 | } /*if (f2py_success) of incy*/ | |||
| 5412 | /* End of cleaning variable incy */ | |||
| 5413 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 5414 | } /*if (f2py_success) of incx*/ | |||
| 5415 | /* End of cleaning variable incx */ | |||
| 5416 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 5417 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 5418 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 5419 | /* End of cleaning variable y */ | |||
| 5420 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 5421 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 5422 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 5423 | /* End of cleaning variable x */ | |||
| 5424 | /*end of cleanupfrompyobj*/ | |||
| 5425 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 5426 | /*routdebugfailure*/ | |||
| 5427 | } else { | |||
| 5428 | /*routdebugleave*/ | |||
| 5429 | } | |||
| 5430 | CFUNCSMESS("Freeing memory.\n"); | |||
| 5431 | /*freemem*/ | |||
| 5432 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5433 | f2py_stop_clock(); | |||
| 5434 | #endif | |||
| 5435 | return capi_buildvalue; | |||
| 5436 | } | |||
| 5437 | /******************************** end of cdotu ********************************/ | |||
| 5438 | ||||
| 5439 | /*********************************** zdotu ***********************************/ | |||
| 5440 | static char doc_f2py_rout__fblas_zdotu[] = "\ | |||
| 5441 | xy = zdotu(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``zdotu``.\ | |||
| 5442 | \n\nParameters\n----------\n" | |||
| 5443 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 5444 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 5445 | "\nOther Parameters\n----------------\n" | |||
| 5446 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 5447 | "offx : input int, optional\n Default: 0\n" | |||
| 5448 | "incx : input int, optional\n Default: 1\n" | |||
| 5449 | "offy : input int, optional\n Default: 0\n" | |||
| 5450 | "incy : input int, optional\n Default: 1\n" | |||
| 5451 | "\nReturns\n-------\n" | |||
| 5452 | "xy : complex"; | |||
| 5453 | /* extern void F_WRAPPEDFUNC(zdotu,ZDOTU)(complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 5454 | static PyObject *f2py_rout__fblas_zdotu(const PyObject *capi_self, | |||
| 5455 | PyObject *capi_args, | |||
| 5456 | PyObject *capi_keywds, | |||
| 5457 | void (*f2py_func)(complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 5458 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 5459 | volatile int f2py_success = 1; | |||
| 5460 | /*decl*/ | |||
| 5461 | ||||
| 5462 | complex_double zdotu; | |||
| 5463 | PyObject *zdotu_capi = Py_None(&_Py_NoneStruct); | |||
| 5464 | int n = 0; | |||
| 5465 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 5466 | complex_double *x = NULL((void*)0); | |||
| 5467 | npy_intp x_Dims[1] = {-1}; | |||
| 5468 | const int x_Rank = 1; | |||
| 5469 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 5470 | int capi_x_intent = 0; | |||
| 5471 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 5472 | int offx = 0; | |||
| 5473 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 5474 | int incx = 0; | |||
| 5475 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 5476 | complex_double *y = NULL((void*)0); | |||
| 5477 | npy_intp y_Dims[1] = {-1}; | |||
| 5478 | const int y_Rank = 1; | |||
| 5479 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 5480 | int capi_y_intent = 0; | |||
| 5481 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 5482 | int offy = 0; | |||
| 5483 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 5484 | int incy = 0; | |||
| 5485 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 5486 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 5487 | ||||
| 5488 | /*routdebugenter*/ | |||
| 5489 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5490 | f2py_start_clock(); | |||
| 5491 | #endif | |||
| 5492 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 5493 | "OO|OOOOO:_fblas.zdotu",\ | |||
| 5494 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 5495 | return NULL((void*)0); | |||
| 5496 | /*frompyobj*/ | |||
| 5497 | /* Processing variable x */ | |||
| 5498 | ; | |||
| 5499 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 5500 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5501 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5502 | if (!PyErr_Occurred()) | |||
| 5503 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.zdotu to C/Fortran array" ); | |||
| 5504 | } else { | |||
| 5505 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5506 | ||||
| 5507 | /* Processing variable y */ | |||
| 5508 | ; | |||
| 5509 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 5510 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 5511 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 5512 | if (!PyErr_Occurred()) | |||
| 5513 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.zdotu to C/Fortran array" ); | |||
| 5514 | } else { | |||
| 5515 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 5516 | ||||
| 5517 | /* Processing variable incx */ | |||
| 5518 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5519 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zdotu() 3rd keyword (incx) can't be converted to int"); | |||
| 5520 | if (f2py_success) { | |||
| 5521 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zdotu:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdotu:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5522 | /* Processing variable incy */ | |||
| 5523 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 5524 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zdotu() 5th keyword (incy) can't be converted to int"); | |||
| 5525 | if (f2py_success) { | |||
| 5526 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zdotu:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdotu:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5527 | /* Processing variable offx */ | |||
| 5528 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 5529 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zdotu() 2nd keyword (offx) can't be converted to int"); | |||
| 5530 | if (f2py_success) { | |||
| 5531 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zdotu:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotu:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5532 | /* Processing variable offy */ | |||
| 5533 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 5534 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zdotu() 4th keyword (offy) can't be converted to int"); | |||
| 5535 | if (f2py_success) { | |||
| 5536 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","zdotu:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotu:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5537 | /* Processing variable n */ | |||
| 5538 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 5539 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zdotu() 1st keyword (n) can't be converted to int"); | |||
| 5540 | if (f2py_success) { | |||
| 5541 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","zdotu:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotu:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5542 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zdotu:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotu:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5543 | /* Processing variable zdotu */ | |||
| 5544 | /*end of frompyobj*/ | |||
| 5545 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5546 | f2py_start_call_clock(); | |||
| 5547 | #endif | |||
| 5548 | /*callfortranroutine*/ | |||
| 5549 | (*f2py_func)(&zdotu,&n,x+offx,&incx,y+offy,&incy) ; | |||
| 5550 | /*(*f2py_func)(&zdotu,&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 5551 | if (PyErr_Occurred()) | |||
| 5552 | f2py_success = 0; | |||
| 5553 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5554 | f2py_stop_call_clock(); | |||
| 5555 | #endif | |||
| 5556 | /*end of callfortranroutine*/ | |||
| 5557 | if (f2py_success) { | |||
| 5558 | /*pyobjfrom*/ | |||
| 5559 | zdotu_capi = pyobj_from_complex_double1(zdotu)(PyComplex_FromDoubles(zdotu.r,zdotu.i)); | |||
| 5560 | /*end of pyobjfrom*/ | |||
| 5561 | CFUNCSMESS("Building return value.\n"); | |||
| 5562 | capi_buildvalue = Py_BuildValue("N",zdotu_capi); | |||
| 5563 | /*closepyobjfrom*/ | |||
| 5564 | /*end of closepyobjfrom*/ | |||
| 5565 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 5566 | /*cleanupfrompyobj*/ | |||
| 5567 | /* End of cleaning variable zdotu */ | |||
| 5568 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 5569 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 5570 | } /*if (f2py_success) of n*/ | |||
| 5571 | /* End of cleaning variable n */ | |||
| 5572 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 5573 | } /*if (f2py_success) of offy*/ | |||
| 5574 | /* End of cleaning variable offy */ | |||
| 5575 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 5576 | } /*if (f2py_success) of offx*/ | |||
| 5577 | /* End of cleaning variable offx */ | |||
| 5578 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 5579 | } /*if (f2py_success) of incy*/ | |||
| 5580 | /* End of cleaning variable incy */ | |||
| 5581 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 5582 | } /*if (f2py_success) of incx*/ | |||
| 5583 | /* End of cleaning variable incx */ | |||
| 5584 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 5585 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 5586 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 5587 | /* End of cleaning variable y */ | |||
| 5588 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 5589 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 5590 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 5591 | /* End of cleaning variable x */ | |||
| 5592 | /*end of cleanupfrompyobj*/ | |||
| 5593 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 5594 | /*routdebugfailure*/ | |||
| 5595 | } else { | |||
| 5596 | /*routdebugleave*/ | |||
| 5597 | } | |||
| 5598 | CFUNCSMESS("Freeing memory.\n"); | |||
| 5599 | /*freemem*/ | |||
| 5600 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5601 | f2py_stop_clock(); | |||
| 5602 | #endif | |||
| 5603 | return capi_buildvalue; | |||
| 5604 | } | |||
| 5605 | /******************************** end of zdotu ********************************/ | |||
| 5606 | ||||
| 5607 | /*********************************** cdotc ***********************************/ | |||
| 5608 | static char doc_f2py_rout__fblas_cdotc[] = "\ | |||
| 5609 | xy = cdotc(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``cdotc``.\ | |||
| 5610 | \n\nParameters\n----------\n" | |||
| 5611 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 5612 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 5613 | "\nOther Parameters\n----------------\n" | |||
| 5614 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 5615 | "offx : input int, optional\n Default: 0\n" | |||
| 5616 | "incx : input int, optional\n Default: 1\n" | |||
| 5617 | "offy : input int, optional\n Default: 0\n" | |||
| 5618 | "incy : input int, optional\n Default: 1\n" | |||
| 5619 | "\nReturns\n-------\n" | |||
| 5620 | "xy : complex"; | |||
| 5621 | /* extern void F_WRAPPEDFUNC(cdotc,CDOTC)(complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 5622 | static PyObject *f2py_rout__fblas_cdotc(const PyObject *capi_self, | |||
| 5623 | PyObject *capi_args, | |||
| 5624 | PyObject *capi_keywds, | |||
| 5625 | void (*f2py_func)(complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 5626 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 5627 | volatile int f2py_success = 1; | |||
| 5628 | /*decl*/ | |||
| 5629 | ||||
| 5630 | complex_float cdotc; | |||
| 5631 | PyObject *cdotc_capi = Py_None(&_Py_NoneStruct); | |||
| 5632 | int n = 0; | |||
| 5633 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 5634 | complex_float *x = NULL((void*)0); | |||
| 5635 | npy_intp x_Dims[1] = {-1}; | |||
| 5636 | const int x_Rank = 1; | |||
| 5637 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 5638 | int capi_x_intent = 0; | |||
| 5639 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 5640 | int offx = 0; | |||
| 5641 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 5642 | int incx = 0; | |||
| 5643 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 5644 | complex_float *y = NULL((void*)0); | |||
| 5645 | npy_intp y_Dims[1] = {-1}; | |||
| 5646 | const int y_Rank = 1; | |||
| 5647 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 5648 | int capi_y_intent = 0; | |||
| 5649 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 5650 | int offy = 0; | |||
| 5651 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 5652 | int incy = 0; | |||
| 5653 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 5654 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 5655 | ||||
| 5656 | /*routdebugenter*/ | |||
| 5657 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5658 | f2py_start_clock(); | |||
| 5659 | #endif | |||
| 5660 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 5661 | "OO|OOOOO:_fblas.cdotc",\ | |||
| 5662 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 5663 | return NULL((void*)0); | |||
| 5664 | /*frompyobj*/ | |||
| 5665 | /* Processing variable x */ | |||
| 5666 | ; | |||
| 5667 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 5668 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5669 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5670 | if (!PyErr_Occurred()) | |||
| 5671 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.cdotc to C/Fortran array" ); | |||
| 5672 | } else { | |||
| 5673 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5674 | ||||
| 5675 | /* Processing variable y */ | |||
| 5676 | ; | |||
| 5677 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 5678 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 5679 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 5680 | if (!PyErr_Occurred()) | |||
| 5681 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.cdotc to C/Fortran array" ); | |||
| 5682 | } else { | |||
| 5683 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 5684 | ||||
| 5685 | /* Processing variable incx */ | |||
| 5686 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5687 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cdotc() 3rd keyword (incx) can't be converted to int"); | |||
| 5688 | if (f2py_success) { | |||
| 5689 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","cdotc:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cdotc:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5690 | /* Processing variable incy */ | |||
| 5691 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 5692 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cdotc() 5th keyword (incy) can't be converted to int"); | |||
| 5693 | if (f2py_success) { | |||
| 5694 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","cdotc:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cdotc:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5695 | /* Processing variable offx */ | |||
| 5696 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 5697 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cdotc() 2nd keyword (offx) can't be converted to int"); | |||
| 5698 | if (f2py_success) { | |||
| 5699 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","cdotc:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotc:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5700 | /* Processing variable offy */ | |||
| 5701 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 5702 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cdotc() 4th keyword (offy) can't be converted to int"); | |||
| 5703 | if (f2py_success) { | |||
| 5704 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","cdotc:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotc:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5705 | /* Processing variable n */ | |||
| 5706 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 5707 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cdotc() 1st keyword (n) can't be converted to int"); | |||
| 5708 | if (f2py_success) { | |||
| 5709 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","cdotc:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotc:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5710 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","cdotc:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cdotc:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5711 | /* Processing variable cdotc */ | |||
| 5712 | /*end of frompyobj*/ | |||
| 5713 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5714 | f2py_start_call_clock(); | |||
| 5715 | #endif | |||
| 5716 | /*callfortranroutine*/ | |||
| 5717 | (*f2py_func)(&cdotc,&n,x+offx,&incx,y+offy,&incy) ; | |||
| 5718 | /*(*f2py_func)(&cdotc,&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 5719 | if (PyErr_Occurred()) | |||
| 5720 | f2py_success = 0; | |||
| 5721 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5722 | f2py_stop_call_clock(); | |||
| 5723 | #endif | |||
| 5724 | /*end of callfortranroutine*/ | |||
| 5725 | if (f2py_success) { | |||
| 5726 | /*pyobjfrom*/ | |||
| 5727 | cdotc_capi = pyobj_from_complex_float1(cdotc)(PyComplex_FromDoubles(cdotc.r,cdotc.i)); | |||
| 5728 | /*end of pyobjfrom*/ | |||
| 5729 | CFUNCSMESS("Building return value.\n"); | |||
| 5730 | capi_buildvalue = Py_BuildValue("N",cdotc_capi); | |||
| 5731 | /*closepyobjfrom*/ | |||
| 5732 | /*end of closepyobjfrom*/ | |||
| 5733 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 5734 | /*cleanupfrompyobj*/ | |||
| 5735 | /* End of cleaning variable cdotc */ | |||
| 5736 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 5737 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 5738 | } /*if (f2py_success) of n*/ | |||
| 5739 | /* End of cleaning variable n */ | |||
| 5740 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 5741 | } /*if (f2py_success) of offy*/ | |||
| 5742 | /* End of cleaning variable offy */ | |||
| 5743 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 5744 | } /*if (f2py_success) of offx*/ | |||
| 5745 | /* End of cleaning variable offx */ | |||
| 5746 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 5747 | } /*if (f2py_success) of incy*/ | |||
| 5748 | /* End of cleaning variable incy */ | |||
| 5749 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 5750 | } /*if (f2py_success) of incx*/ | |||
| 5751 | /* End of cleaning variable incx */ | |||
| 5752 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 5753 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 5754 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 5755 | /* End of cleaning variable y */ | |||
| 5756 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 5757 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 5758 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 5759 | /* End of cleaning variable x */ | |||
| 5760 | /*end of cleanupfrompyobj*/ | |||
| 5761 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 5762 | /*routdebugfailure*/ | |||
| 5763 | } else { | |||
| 5764 | /*routdebugleave*/ | |||
| 5765 | } | |||
| 5766 | CFUNCSMESS("Freeing memory.\n"); | |||
| 5767 | /*freemem*/ | |||
| 5768 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5769 | f2py_stop_clock(); | |||
| 5770 | #endif | |||
| 5771 | return capi_buildvalue; | |||
| 5772 | } | |||
| 5773 | /******************************** end of cdotc ********************************/ | |||
| 5774 | ||||
| 5775 | /*********************************** zdotc ***********************************/ | |||
| 5776 | static char doc_f2py_rout__fblas_zdotc[] = "\ | |||
| 5777 | xy = zdotc(x,y,[n,offx,incx,offy,incy])\n\nWrapper for ``zdotc``.\ | |||
| 5778 | \n\nParameters\n----------\n" | |||
| 5779 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 5780 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 5781 | "\nOther Parameters\n----------------\n" | |||
| 5782 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 5783 | "offx : input int, optional\n Default: 0\n" | |||
| 5784 | "incx : input int, optional\n Default: 1\n" | |||
| 5785 | "offy : input int, optional\n Default: 0\n" | |||
| 5786 | "incy : input int, optional\n Default: 1\n" | |||
| 5787 | "\nReturns\n-------\n" | |||
| 5788 | "xy : complex"; | |||
| 5789 | /* extern void F_WRAPPEDFUNC(zdotc,ZDOTC)(complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 5790 | static PyObject *f2py_rout__fblas_zdotc(const PyObject *capi_self, | |||
| 5791 | PyObject *capi_args, | |||
| 5792 | PyObject *capi_keywds, | |||
| 5793 | void (*f2py_func)(complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 5794 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 5795 | volatile int f2py_success = 1; | |||
| 5796 | /*decl*/ | |||
| 5797 | ||||
| 5798 | complex_double zdotc; | |||
| 5799 | PyObject *zdotc_capi = Py_None(&_Py_NoneStruct); | |||
| 5800 | int n = 0; | |||
| 5801 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 5802 | complex_double *x = NULL((void*)0); | |||
| 5803 | npy_intp x_Dims[1] = {-1}; | |||
| 5804 | const int x_Rank = 1; | |||
| 5805 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 5806 | int capi_x_intent = 0; | |||
| 5807 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 5808 | int offx = 0; | |||
| 5809 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 5810 | int incx = 0; | |||
| 5811 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 5812 | complex_double *y = NULL((void*)0); | |||
| 5813 | npy_intp y_Dims[1] = {-1}; | |||
| 5814 | const int y_Rank = 1; | |||
| 5815 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 5816 | int capi_y_intent = 0; | |||
| 5817 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 5818 | int offy = 0; | |||
| 5819 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 5820 | int incy = 0; | |||
| 5821 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 5822 | static char *capi_kwlist[] = {"x","y","n","offx","incx","offy","incy",NULL((void*)0)}; | |||
| 5823 | ||||
| 5824 | /*routdebugenter*/ | |||
| 5825 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5826 | f2py_start_clock(); | |||
| 5827 | #endif | |||
| 5828 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 5829 | "OO|OOOOO:_fblas.zdotc",\ | |||
| 5830 | capi_kwlist,&x_capi,&y_capi,&n_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi)) | |||
| 5831 | return NULL((void*)0); | |||
| 5832 | /*frompyobj*/ | |||
| 5833 | /* Processing variable x */ | |||
| 5834 | ; | |||
| 5835 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 5836 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5837 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5838 | if (!PyErr_Occurred()) | |||
| 5839 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.zdotc to C/Fortran array" ); | |||
| 5840 | } else { | |||
| 5841 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5842 | ||||
| 5843 | /* Processing variable y */ | |||
| 5844 | ; | |||
| 5845 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 5846 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 5847 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 5848 | if (!PyErr_Occurred()) | |||
| 5849 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `y' of _fblas.zdotc to C/Fortran array" ); | |||
| 5850 | } else { | |||
| 5851 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 5852 | ||||
| 5853 | /* Processing variable incx */ | |||
| 5854 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5855 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zdotc() 3rd keyword (incx) can't be converted to int"); | |||
| 5856 | if (f2py_success) { | |||
| 5857 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","zdotc:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdotc:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5858 | /* Processing variable incy */ | |||
| 5859 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 5860 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zdotc() 5th keyword (incy) can't be converted to int"); | |||
| 5861 | if (f2py_success) { | |||
| 5862 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zdotc:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zdotc:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 5863 | /* Processing variable offx */ | |||
| 5864 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 5865 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zdotc() 2nd keyword (offx) can't be converted to int"); | |||
| 5866 | if (f2py_success) { | |||
| 5867 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","zdotc:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotc:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5868 | /* Processing variable offy */ | |||
| 5869 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 5870 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zdotc() 4th keyword (offy) can't be converted to int"); | |||
| 5871 | if (f2py_success) { | |||
| 5872 | CHECKSCALAR(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword offy","zdotc:offy=%d",offy)if (!(offy>=0 && offy<y_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotc:offy=%d", "(""offy>=0 && offy<len(y)" ") failed for ""4th keyword offy", offy); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5873 | /* Processing variable n */ | |||
| 5874 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 5875 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zdotc() 1st keyword (n) can't be converted to int"); | |||
| 5876 | if (f2py_success) { | |||
| 5877 | CHECKSCALAR(len(y)-offy>(n-1)*abs(incy),"len(y)-offy>(n-1)*abs(incy)","1st keyword n","zdotc:n=%d",n)if (!(y_Dims[0]-offy>(n-1)*abs(incy))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotc:n=%d", "(""len(y)-offy>(n-1)*abs(incy)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5878 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","zdotc:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zdotc:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 5879 | /* Processing variable zdotc */ | |||
| 5880 | /*end of frompyobj*/ | |||
| 5881 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5882 | f2py_start_call_clock(); | |||
| 5883 | #endif | |||
| 5884 | /*callfortranroutine*/ | |||
| 5885 | (*f2py_func)(&zdotc,&n,x+offx,&incx,y+offy,&incy) ; | |||
| 5886 | /*(*f2py_func)(&zdotc,&n,x,&offx,&incx,y,&offy,&incy);*/ | |||
| 5887 | if (PyErr_Occurred()) | |||
| 5888 | f2py_success = 0; | |||
| 5889 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5890 | f2py_stop_call_clock(); | |||
| 5891 | #endif | |||
| 5892 | /*end of callfortranroutine*/ | |||
| 5893 | if (f2py_success) { | |||
| 5894 | /*pyobjfrom*/ | |||
| 5895 | zdotc_capi = pyobj_from_complex_double1(zdotc)(PyComplex_FromDoubles(zdotc.r,zdotc.i)); | |||
| 5896 | /*end of pyobjfrom*/ | |||
| 5897 | CFUNCSMESS("Building return value.\n"); | |||
| 5898 | capi_buildvalue = Py_BuildValue("N",zdotc_capi); | |||
| 5899 | /*closepyobjfrom*/ | |||
| 5900 | /*end of closepyobjfrom*/ | |||
| 5901 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 5902 | /*cleanupfrompyobj*/ | |||
| 5903 | /* End of cleaning variable zdotc */ | |||
| 5904 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 5905 | } /*CHECKSCALAR(len(y)-offy>(n-1)*abs(incy))*/ | |||
| 5906 | } /*if (f2py_success) of n*/ | |||
| 5907 | /* End of cleaning variable n */ | |||
| 5908 | } /*CHECKSCALAR(offy>=0 && offy<len(y))*/ | |||
| 5909 | } /*if (f2py_success) of offy*/ | |||
| 5910 | /* End of cleaning variable offy */ | |||
| 5911 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 5912 | } /*if (f2py_success) of offx*/ | |||
| 5913 | /* End of cleaning variable offx */ | |||
| 5914 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 5915 | } /*if (f2py_success) of incy*/ | |||
| 5916 | /* End of cleaning variable incy */ | |||
| 5917 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 5918 | } /*if (f2py_success) of incx*/ | |||
| 5919 | /* End of cleaning variable incx */ | |||
| 5920 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 5921 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 5922 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 5923 | /* End of cleaning variable y */ | |||
| 5924 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 5925 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 5926 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 5927 | /* End of cleaning variable x */ | |||
| 5928 | /*end of cleanupfrompyobj*/ | |||
| 5929 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 5930 | /*routdebugfailure*/ | |||
| 5931 | } else { | |||
| 5932 | /*routdebugleave*/ | |||
| 5933 | } | |||
| 5934 | CFUNCSMESS("Freeing memory.\n"); | |||
| 5935 | /*freemem*/ | |||
| 5936 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5937 | f2py_stop_clock(); | |||
| 5938 | #endif | |||
| 5939 | return capi_buildvalue; | |||
| 5940 | } | |||
| 5941 | /******************************** end of zdotc ********************************/ | |||
| 5942 | ||||
| 5943 | /*********************************** snrm2 ***********************************/ | |||
| 5944 | static char doc_f2py_rout__fblas_snrm2[] = "\ | |||
| 5945 | n2 = snrm2(x,[n,offx,incx])\n\nWrapper for ``snrm2``.\ | |||
| 5946 | \n\nParameters\n----------\n" | |||
| 5947 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 5948 | "\nOther Parameters\n----------------\n" | |||
| 5949 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 5950 | "offx : input int, optional\n Default: 0\n" | |||
| 5951 | "incx : input int, optional\n Default: 1\n" | |||
| 5952 | "\nReturns\n-------\n" | |||
| 5953 | "n2 : float"; | |||
| 5954 | /* extern void F_WRAPPEDFUNC(snrm2,SNRM2)(float*,F_INT*,float*,F_INT* ); */ | |||
| 5955 | static PyObject *f2py_rout__fblas_snrm2(const PyObject *capi_self, | |||
| 5956 | PyObject *capi_args, | |||
| 5957 | PyObject *capi_keywds, | |||
| 5958 | void (*f2py_func)(float*,F_INTint*,float*,F_INTint* )) { | |||
| 5959 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 5960 | volatile int f2py_success = 1; | |||
| 5961 | /*decl*/ | |||
| 5962 | ||||
| 5963 | float snrm2 = 0; | |||
| 5964 | int n = 0; | |||
| 5965 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 5966 | float *x = NULL((void*)0); | |||
| 5967 | npy_intp x_Dims[1] = {-1}; | |||
| 5968 | const int x_Rank = 1; | |||
| 5969 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 5970 | int capi_x_intent = 0; | |||
| 5971 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 5972 | int offx = 0; | |||
| 5973 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 5974 | int incx = 0; | |||
| 5975 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 5976 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 5977 | ||||
| 5978 | /*routdebugenter*/ | |||
| 5979 | #ifdef F2PY_REPORT_ATEXIT | |||
| 5980 | f2py_start_clock(); | |||
| 5981 | #endif | |||
| 5982 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 5983 | "O|OOO:_fblas.snrm2",\ | |||
| 5984 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 5985 | return NULL((void*)0); | |||
| 5986 | /*frompyobj*/ | |||
| 5987 | /* Processing variable x */ | |||
| 5988 | ; | |||
| 5989 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 5990 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 5991 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 5992 | if (!PyErr_Occurred()) | |||
| 5993 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.snrm2 to C/Fortran array" ); | |||
| 5994 | } else { | |||
| 5995 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 5996 | ||||
| 5997 | /* Processing variable incx */ | |||
| 5998 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 5999 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.snrm2() 3rd keyword (incx) can't be converted to int"); | |||
| 6000 | if (f2py_success) { | |||
| 6001 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","snrm2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""snrm2:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6002 | /* Processing variable offx */ | |||
| 6003 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6004 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.snrm2() 2nd keyword (offx) can't be converted to int"); | |||
| 6005 | if (f2py_success) { | |||
| 6006 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","snrm2:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""snrm2:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6007 | /* Processing variable n */ | |||
| 6008 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6009 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.snrm2() 1st keyword (n) can't be converted to int"); | |||
| 6010 | if (f2py_success) { | |||
| 6011 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","snrm2:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""snrm2:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6012 | /* Processing variable snrm2 */ | |||
| 6013 | /*end of frompyobj*/ | |||
| 6014 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6015 | f2py_start_call_clock(); | |||
| 6016 | #endif | |||
| 6017 | /*callfortranroutine*/ | |||
| 6018 | (*f2py_func)(&snrm2, &n,x+offx,&incx) ; | |||
| 6019 | /*(*f2py_func)(&snrm2,&n,x,&offx,&incx);*/ | |||
| 6020 | if (PyErr_Occurred()) | |||
| 6021 | f2py_success = 0; | |||
| 6022 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6023 | f2py_stop_call_clock(); | |||
| 6024 | #endif | |||
| 6025 | /*end of callfortranroutine*/ | |||
| 6026 | if (f2py_success) { | |||
| 6027 | /*pyobjfrom*/ | |||
| 6028 | /*end of pyobjfrom*/ | |||
| 6029 | CFUNCSMESS("Building return value.\n"); | |||
| 6030 | capi_buildvalue = Py_BuildValue("f",snrm2); | |||
| 6031 | /*closepyobjfrom*/ | |||
| 6032 | /*end of closepyobjfrom*/ | |||
| 6033 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6034 | /*cleanupfrompyobj*/ | |||
| 6035 | /* End of cleaning variable snrm2 */ | |||
| 6036 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6037 | } /*if (f2py_success) of n*/ | |||
| 6038 | /* End of cleaning variable n */ | |||
| 6039 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6040 | } /*if (f2py_success) of offx*/ | |||
| 6041 | /* End of cleaning variable offx */ | |||
| 6042 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6043 | } /*if (f2py_success) of incx*/ | |||
| 6044 | /* End of cleaning variable incx */ | |||
| 6045 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6046 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6047 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6048 | /* End of cleaning variable x */ | |||
| 6049 | /*end of cleanupfrompyobj*/ | |||
| 6050 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6051 | /*routdebugfailure*/ | |||
| 6052 | } else { | |||
| 6053 | /*routdebugleave*/ | |||
| 6054 | } | |||
| 6055 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6056 | /*freemem*/ | |||
| 6057 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6058 | f2py_stop_clock(); | |||
| 6059 | #endif | |||
| 6060 | return capi_buildvalue; | |||
| 6061 | } | |||
| 6062 | /******************************** end of snrm2 ********************************/ | |||
| 6063 | ||||
| 6064 | /*********************************** scnrm2 ***********************************/ | |||
| 6065 | static char doc_f2py_rout__fblas_scnrm2[] = "\ | |||
| 6066 | n2 = scnrm2(x,[n,offx,incx])\n\nWrapper for ``scnrm2``.\ | |||
| 6067 | \n\nParameters\n----------\n" | |||
| 6068 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 6069 | "\nOther Parameters\n----------------\n" | |||
| 6070 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6071 | "offx : input int, optional\n Default: 0\n" | |||
| 6072 | "incx : input int, optional\n Default: 1\n" | |||
| 6073 | "\nReturns\n-------\n" | |||
| 6074 | "n2 : float"; | |||
| 6075 | /* extern void F_WRAPPEDFUNC(scnrm2,SCNRM2)(float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 6076 | static PyObject *f2py_rout__fblas_scnrm2(const PyObject *capi_self, | |||
| 6077 | PyObject *capi_args, | |||
| 6078 | PyObject *capi_keywds, | |||
| 6079 | void (*f2py_func)(float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 6080 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6081 | volatile int f2py_success = 1; | |||
| 6082 | /*decl*/ | |||
| 6083 | ||||
| 6084 | float scnrm2 = 0; | |||
| 6085 | int n = 0; | |||
| 6086 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6087 | complex_float *x = NULL((void*)0); | |||
| 6088 | npy_intp x_Dims[1] = {-1}; | |||
| 6089 | const int x_Rank = 1; | |||
| 6090 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6091 | int capi_x_intent = 0; | |||
| 6092 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6093 | int offx = 0; | |||
| 6094 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6095 | int incx = 0; | |||
| 6096 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6097 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6098 | ||||
| 6099 | /*routdebugenter*/ | |||
| 6100 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6101 | f2py_start_clock(); | |||
| 6102 | #endif | |||
| 6103 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6104 | "O|OOO:_fblas.scnrm2",\ | |||
| 6105 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6106 | return NULL((void*)0); | |||
| 6107 | /*frompyobj*/ | |||
| 6108 | /* Processing variable x */ | |||
| 6109 | ; | |||
| 6110 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6111 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6112 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6113 | if (!PyErr_Occurred()) | |||
| 6114 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.scnrm2 to C/Fortran array" ); | |||
| 6115 | } else { | |||
| 6116 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6117 | ||||
| 6118 | /* Processing variable incx */ | |||
| 6119 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6120 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.scnrm2() 3rd keyword (incx) can't be converted to int"); | |||
| 6121 | if (f2py_success) { | |||
| 6122 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","scnrm2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""scnrm2:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6123 | /* Processing variable offx */ | |||
| 6124 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6125 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.scnrm2() 2nd keyword (offx) can't be converted to int"); | |||
| 6126 | if (f2py_success) { | |||
| 6127 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","scnrm2:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scnrm2:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6128 | /* Processing variable n */ | |||
| 6129 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6130 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.scnrm2() 1st keyword (n) can't be converted to int"); | |||
| 6131 | if (f2py_success) { | |||
| 6132 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","scnrm2:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scnrm2:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6133 | /* Processing variable scnrm2 */ | |||
| 6134 | /*end of frompyobj*/ | |||
| 6135 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6136 | f2py_start_call_clock(); | |||
| 6137 | #endif | |||
| 6138 | /*callfortranroutine*/ | |||
| 6139 | (*f2py_func)(&scnrm2, &n,x+offx,&incx) ; | |||
| 6140 | /*(*f2py_func)(&scnrm2,&n,x,&offx,&incx);*/ | |||
| 6141 | if (PyErr_Occurred()) | |||
| 6142 | f2py_success = 0; | |||
| 6143 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6144 | f2py_stop_call_clock(); | |||
| 6145 | #endif | |||
| 6146 | /*end of callfortranroutine*/ | |||
| 6147 | if (f2py_success) { | |||
| 6148 | /*pyobjfrom*/ | |||
| 6149 | /*end of pyobjfrom*/ | |||
| 6150 | CFUNCSMESS("Building return value.\n"); | |||
| 6151 | capi_buildvalue = Py_BuildValue("f",scnrm2); | |||
| 6152 | /*closepyobjfrom*/ | |||
| 6153 | /*end of closepyobjfrom*/ | |||
| 6154 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6155 | /*cleanupfrompyobj*/ | |||
| 6156 | /* End of cleaning variable scnrm2 */ | |||
| 6157 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6158 | } /*if (f2py_success) of n*/ | |||
| 6159 | /* End of cleaning variable n */ | |||
| 6160 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6161 | } /*if (f2py_success) of offx*/ | |||
| 6162 | /* End of cleaning variable offx */ | |||
| 6163 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6164 | } /*if (f2py_success) of incx*/ | |||
| 6165 | /* End of cleaning variable incx */ | |||
| 6166 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6167 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6168 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6169 | /* End of cleaning variable x */ | |||
| 6170 | /*end of cleanupfrompyobj*/ | |||
| 6171 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6172 | /*routdebugfailure*/ | |||
| 6173 | } else { | |||
| 6174 | /*routdebugleave*/ | |||
| 6175 | } | |||
| 6176 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6177 | /*freemem*/ | |||
| 6178 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6179 | f2py_stop_clock(); | |||
| 6180 | #endif | |||
| 6181 | return capi_buildvalue; | |||
| 6182 | } | |||
| 6183 | /******************************* end of scnrm2 *******************************/ | |||
| 6184 | ||||
| 6185 | /*********************************** dnrm2 ***********************************/ | |||
| 6186 | static char doc_f2py_rout__fblas_dnrm2[] = "\ | |||
| 6187 | n2 = dnrm2(x,[n,offx,incx])\n\nWrapper for ``dnrm2``.\ | |||
| 6188 | \n\nParameters\n----------\n" | |||
| 6189 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 6190 | "\nOther Parameters\n----------------\n" | |||
| 6191 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6192 | "offx : input int, optional\n Default: 0\n" | |||
| 6193 | "incx : input int, optional\n Default: 1\n" | |||
| 6194 | "\nReturns\n-------\n" | |||
| 6195 | "n2 : float"; | |||
| 6196 | /* extern void F_WRAPPEDFUNC(dnrm2,DNRM2)(double*,F_INT*,double*,F_INT* ); */ | |||
| 6197 | static PyObject *f2py_rout__fblas_dnrm2(const PyObject *capi_self, | |||
| 6198 | PyObject *capi_args, | |||
| 6199 | PyObject *capi_keywds, | |||
| 6200 | void (*f2py_func)(double*,F_INTint*,double*,F_INTint* )) { | |||
| 6201 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6202 | volatile int f2py_success = 1; | |||
| 6203 | /*decl*/ | |||
| 6204 | ||||
| 6205 | double dnrm2 = 0; | |||
| 6206 | int n = 0; | |||
| 6207 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6208 | double *x = NULL((void*)0); | |||
| 6209 | npy_intp x_Dims[1] = {-1}; | |||
| 6210 | const int x_Rank = 1; | |||
| 6211 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6212 | int capi_x_intent = 0; | |||
| 6213 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6214 | int offx = 0; | |||
| 6215 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6216 | int incx = 0; | |||
| 6217 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6218 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6219 | ||||
| 6220 | /*routdebugenter*/ | |||
| 6221 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6222 | f2py_start_clock(); | |||
| 6223 | #endif | |||
| 6224 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6225 | "O|OOO:_fblas.dnrm2",\ | |||
| 6226 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6227 | return NULL((void*)0); | |||
| 6228 | /*frompyobj*/ | |||
| 6229 | /* Processing variable x */ | |||
| 6230 | ; | |||
| 6231 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6232 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6233 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6234 | if (!PyErr_Occurred()) | |||
| 6235 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.dnrm2 to C/Fortran array" ); | |||
| 6236 | } else { | |||
| 6237 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6238 | ||||
| 6239 | /* Processing variable incx */ | |||
| 6240 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6241 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dnrm2() 3rd keyword (incx) can't be converted to int"); | |||
| 6242 | if (f2py_success) { | |||
| 6243 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dnrm2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dnrm2:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6244 | /* Processing variable offx */ | |||
| 6245 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6246 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dnrm2() 2nd keyword (offx) can't be converted to int"); | |||
| 6247 | if (f2py_success) { | |||
| 6248 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dnrm2:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dnrm2:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6249 | /* Processing variable n */ | |||
| 6250 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6251 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dnrm2() 1st keyword (n) can't be converted to int"); | |||
| 6252 | if (f2py_success) { | |||
| 6253 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dnrm2:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dnrm2:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6254 | /* Processing variable dnrm2 */ | |||
| 6255 | /*end of frompyobj*/ | |||
| 6256 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6257 | f2py_start_call_clock(); | |||
| 6258 | #endif | |||
| 6259 | /*callfortranroutine*/ | |||
| 6260 | (*f2py_func)(&dnrm2, &n,x+offx,&incx) ; | |||
| 6261 | /*(*f2py_func)(&dnrm2,&n,x,&offx,&incx);*/ | |||
| 6262 | if (PyErr_Occurred()) | |||
| 6263 | f2py_success = 0; | |||
| 6264 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6265 | f2py_stop_call_clock(); | |||
| 6266 | #endif | |||
| 6267 | /*end of callfortranroutine*/ | |||
| 6268 | if (f2py_success) { | |||
| 6269 | /*pyobjfrom*/ | |||
| 6270 | /*end of pyobjfrom*/ | |||
| 6271 | CFUNCSMESS("Building return value.\n"); | |||
| 6272 | capi_buildvalue = Py_BuildValue("d",dnrm2); | |||
| 6273 | /*closepyobjfrom*/ | |||
| 6274 | /*end of closepyobjfrom*/ | |||
| 6275 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6276 | /*cleanupfrompyobj*/ | |||
| 6277 | /* End of cleaning variable dnrm2 */ | |||
| 6278 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6279 | } /*if (f2py_success) of n*/ | |||
| 6280 | /* End of cleaning variable n */ | |||
| 6281 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6282 | } /*if (f2py_success) of offx*/ | |||
| 6283 | /* End of cleaning variable offx */ | |||
| 6284 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6285 | } /*if (f2py_success) of incx*/ | |||
| 6286 | /* End of cleaning variable incx */ | |||
| 6287 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6288 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6289 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6290 | /* End of cleaning variable x */ | |||
| 6291 | /*end of cleanupfrompyobj*/ | |||
| 6292 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6293 | /*routdebugfailure*/ | |||
| 6294 | } else { | |||
| 6295 | /*routdebugleave*/ | |||
| 6296 | } | |||
| 6297 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6298 | /*freemem*/ | |||
| 6299 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6300 | f2py_stop_clock(); | |||
| 6301 | #endif | |||
| 6302 | return capi_buildvalue; | |||
| 6303 | } | |||
| 6304 | /******************************** end of dnrm2 ********************************/ | |||
| 6305 | ||||
| 6306 | /*********************************** dznrm2 ***********************************/ | |||
| 6307 | static char doc_f2py_rout__fblas_dznrm2[] = "\ | |||
| 6308 | n2 = dznrm2(x,[n,offx,incx])\n\nWrapper for ``dznrm2``.\ | |||
| 6309 | \n\nParameters\n----------\n" | |||
| 6310 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 6311 | "\nOther Parameters\n----------------\n" | |||
| 6312 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6313 | "offx : input int, optional\n Default: 0\n" | |||
| 6314 | "incx : input int, optional\n Default: 1\n" | |||
| 6315 | "\nReturns\n-------\n" | |||
| 6316 | "n2 : float"; | |||
| 6317 | /* extern void F_WRAPPEDFUNC(dznrm2,DZNRM2)(double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 6318 | static PyObject *f2py_rout__fblas_dznrm2(const PyObject *capi_self, | |||
| 6319 | PyObject *capi_args, | |||
| 6320 | PyObject *capi_keywds, | |||
| 6321 | void (*f2py_func)(double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 6322 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6323 | volatile int f2py_success = 1; | |||
| 6324 | /*decl*/ | |||
| 6325 | ||||
| 6326 | double dznrm2 = 0; | |||
| 6327 | int n = 0; | |||
| 6328 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6329 | complex_double *x = NULL((void*)0); | |||
| 6330 | npy_intp x_Dims[1] = {-1}; | |||
| 6331 | const int x_Rank = 1; | |||
| 6332 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6333 | int capi_x_intent = 0; | |||
| 6334 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6335 | int offx = 0; | |||
| 6336 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6337 | int incx = 0; | |||
| 6338 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6339 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6340 | ||||
| 6341 | /*routdebugenter*/ | |||
| 6342 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6343 | f2py_start_clock(); | |||
| 6344 | #endif | |||
| 6345 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6346 | "O|OOO:_fblas.dznrm2",\ | |||
| 6347 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6348 | return NULL((void*)0); | |||
| 6349 | /*frompyobj*/ | |||
| 6350 | /* Processing variable x */ | |||
| 6351 | ; | |||
| 6352 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6353 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6354 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6355 | if (!PyErr_Occurred()) | |||
| 6356 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.dznrm2 to C/Fortran array" ); | |||
| 6357 | } else { | |||
| 6358 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6359 | ||||
| 6360 | /* Processing variable incx */ | |||
| 6361 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6362 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dznrm2() 3rd keyword (incx) can't be converted to int"); | |||
| 6363 | if (f2py_success) { | |||
| 6364 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dznrm2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dznrm2:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6365 | /* Processing variable offx */ | |||
| 6366 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6367 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dznrm2() 2nd keyword (offx) can't be converted to int"); | |||
| 6368 | if (f2py_success) { | |||
| 6369 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dznrm2:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dznrm2:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6370 | /* Processing variable n */ | |||
| 6371 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6372 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dznrm2() 1st keyword (n) can't be converted to int"); | |||
| 6373 | if (f2py_success) { | |||
| 6374 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dznrm2:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dznrm2:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6375 | /* Processing variable dznrm2 */ | |||
| 6376 | /*end of frompyobj*/ | |||
| 6377 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6378 | f2py_start_call_clock(); | |||
| 6379 | #endif | |||
| 6380 | /*callfortranroutine*/ | |||
| 6381 | (*f2py_func)(&dznrm2, &n,x+offx,&incx) ; | |||
| 6382 | /*(*f2py_func)(&dznrm2,&n,x,&offx,&incx);*/ | |||
| 6383 | if (PyErr_Occurred()) | |||
| 6384 | f2py_success = 0; | |||
| 6385 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6386 | f2py_stop_call_clock(); | |||
| 6387 | #endif | |||
| 6388 | /*end of callfortranroutine*/ | |||
| 6389 | if (f2py_success) { | |||
| 6390 | /*pyobjfrom*/ | |||
| 6391 | /*end of pyobjfrom*/ | |||
| 6392 | CFUNCSMESS("Building return value.\n"); | |||
| 6393 | capi_buildvalue = Py_BuildValue("d",dznrm2); | |||
| 6394 | /*closepyobjfrom*/ | |||
| 6395 | /*end of closepyobjfrom*/ | |||
| 6396 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6397 | /*cleanupfrompyobj*/ | |||
| 6398 | /* End of cleaning variable dznrm2 */ | |||
| 6399 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6400 | } /*if (f2py_success) of n*/ | |||
| 6401 | /* End of cleaning variable n */ | |||
| 6402 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6403 | } /*if (f2py_success) of offx*/ | |||
| 6404 | /* End of cleaning variable offx */ | |||
| 6405 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6406 | } /*if (f2py_success) of incx*/ | |||
| 6407 | /* End of cleaning variable incx */ | |||
| 6408 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6409 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6410 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6411 | /* End of cleaning variable x */ | |||
| 6412 | /*end of cleanupfrompyobj*/ | |||
| 6413 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6414 | /*routdebugfailure*/ | |||
| 6415 | } else { | |||
| 6416 | /*routdebugleave*/ | |||
| 6417 | } | |||
| 6418 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6419 | /*freemem*/ | |||
| 6420 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6421 | f2py_stop_clock(); | |||
| 6422 | #endif | |||
| 6423 | return capi_buildvalue; | |||
| 6424 | } | |||
| 6425 | /******************************* end of dznrm2 *******************************/ | |||
| 6426 | ||||
| 6427 | /*********************************** sasum ***********************************/ | |||
| 6428 | static char doc_f2py_rout__fblas_sasum[] = "\ | |||
| 6429 | s = sasum(x,[n,offx,incx])\n\nWrapper for ``sasum``.\ | |||
| 6430 | \n\nParameters\n----------\n" | |||
| 6431 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 6432 | "\nOther Parameters\n----------------\n" | |||
| 6433 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6434 | "offx : input int, optional\n Default: 0\n" | |||
| 6435 | "incx : input int, optional\n Default: 1\n" | |||
| 6436 | "\nReturns\n-------\n" | |||
| 6437 | "s : float"; | |||
| 6438 | /* extern void F_WRAPPEDFUNC(sasum,SASUM)(float*,F_INT*,float*,F_INT* ); */ | |||
| 6439 | static PyObject *f2py_rout__fblas_sasum(const PyObject *capi_self, | |||
| 6440 | PyObject *capi_args, | |||
| 6441 | PyObject *capi_keywds, | |||
| 6442 | void (*f2py_func)(float*,F_INTint*,float*,F_INTint* )) { | |||
| 6443 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6444 | volatile int f2py_success = 1; | |||
| 6445 | /*decl*/ | |||
| 6446 | ||||
| 6447 | float sasum = 0; | |||
| 6448 | int n = 0; | |||
| 6449 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6450 | float *x = NULL((void*)0); | |||
| 6451 | npy_intp x_Dims[1] = {-1}; | |||
| 6452 | const int x_Rank = 1; | |||
| 6453 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6454 | int capi_x_intent = 0; | |||
| 6455 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6456 | int offx = 0; | |||
| 6457 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6458 | int incx = 0; | |||
| 6459 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6460 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6461 | ||||
| 6462 | /*routdebugenter*/ | |||
| 6463 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6464 | f2py_start_clock(); | |||
| 6465 | #endif | |||
| 6466 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6467 | "O|OOO:_fblas.sasum",\ | |||
| 6468 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6469 | return NULL((void*)0); | |||
| 6470 | /*frompyobj*/ | |||
| 6471 | /* Processing variable x */ | |||
| 6472 | ; | |||
| 6473 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6474 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6475 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6476 | if (!PyErr_Occurred()) | |||
| 6477 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.sasum to C/Fortran array" ); | |||
| 6478 | } else { | |||
| 6479 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6480 | ||||
| 6481 | /* Processing variable incx */ | |||
| 6482 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6483 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sasum() 3rd keyword (incx) can't be converted to int"); | |||
| 6484 | if (f2py_success) { | |||
| 6485 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","sasum:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sasum:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6486 | /* Processing variable offx */ | |||
| 6487 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6488 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sasum() 2nd keyword (offx) can't be converted to int"); | |||
| 6489 | if (f2py_success) { | |||
| 6490 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","sasum:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sasum:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6491 | /* Processing variable n */ | |||
| 6492 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6493 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sasum() 1st keyword (n) can't be converted to int"); | |||
| 6494 | if (f2py_success) { | |||
| 6495 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","sasum:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sasum:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6496 | /* Processing variable sasum */ | |||
| 6497 | /*end of frompyobj*/ | |||
| 6498 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6499 | f2py_start_call_clock(); | |||
| 6500 | #endif | |||
| 6501 | /*callfortranroutine*/ | |||
| 6502 | (*f2py_func)(&sasum,&n,x+offx,&incx) ; | |||
| 6503 | /*(*f2py_func)(&sasum,&n,x,&offx,&incx);*/ | |||
| 6504 | if (PyErr_Occurred()) | |||
| 6505 | f2py_success = 0; | |||
| 6506 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6507 | f2py_stop_call_clock(); | |||
| 6508 | #endif | |||
| 6509 | /*end of callfortranroutine*/ | |||
| 6510 | if (f2py_success) { | |||
| 6511 | /*pyobjfrom*/ | |||
| 6512 | /*end of pyobjfrom*/ | |||
| 6513 | CFUNCSMESS("Building return value.\n"); | |||
| 6514 | capi_buildvalue = Py_BuildValue("f",sasum); | |||
| 6515 | /*closepyobjfrom*/ | |||
| 6516 | /*end of closepyobjfrom*/ | |||
| 6517 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6518 | /*cleanupfrompyobj*/ | |||
| 6519 | /* End of cleaning variable sasum */ | |||
| 6520 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6521 | } /*if (f2py_success) of n*/ | |||
| 6522 | /* End of cleaning variable n */ | |||
| 6523 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6524 | } /*if (f2py_success) of offx*/ | |||
| 6525 | /* End of cleaning variable offx */ | |||
| 6526 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6527 | } /*if (f2py_success) of incx*/ | |||
| 6528 | /* End of cleaning variable incx */ | |||
| 6529 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6530 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6531 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6532 | /* End of cleaning variable x */ | |||
| 6533 | /*end of cleanupfrompyobj*/ | |||
| 6534 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6535 | /*routdebugfailure*/ | |||
| 6536 | } else { | |||
| 6537 | /*routdebugleave*/ | |||
| 6538 | } | |||
| 6539 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6540 | /*freemem*/ | |||
| 6541 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6542 | f2py_stop_clock(); | |||
| 6543 | #endif | |||
| 6544 | return capi_buildvalue; | |||
| 6545 | } | |||
| 6546 | /******************************** end of sasum ********************************/ | |||
| 6547 | ||||
| 6548 | /*********************************** scasum ***********************************/ | |||
| 6549 | static char doc_f2py_rout__fblas_scasum[] = "\ | |||
| 6550 | s = scasum(x,[n,offx,incx])\n\nWrapper for ``scasum``.\ | |||
| 6551 | \n\nParameters\n----------\n" | |||
| 6552 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 6553 | "\nOther Parameters\n----------------\n" | |||
| 6554 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6555 | "offx : input int, optional\n Default: 0\n" | |||
| 6556 | "incx : input int, optional\n Default: 1\n" | |||
| 6557 | "\nReturns\n-------\n" | |||
| 6558 | "s : float"; | |||
| 6559 | /* extern void F_WRAPPEDFUNC(scasum,SCASUM)(float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 6560 | static PyObject *f2py_rout__fblas_scasum(const PyObject *capi_self, | |||
| 6561 | PyObject *capi_args, | |||
| 6562 | PyObject *capi_keywds, | |||
| 6563 | void (*f2py_func)(float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 6564 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6565 | volatile int f2py_success = 1; | |||
| 6566 | /*decl*/ | |||
| 6567 | ||||
| 6568 | float scasum = 0; | |||
| 6569 | int n = 0; | |||
| 6570 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6571 | complex_float *x = NULL((void*)0); | |||
| 6572 | npy_intp x_Dims[1] = {-1}; | |||
| 6573 | const int x_Rank = 1; | |||
| 6574 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6575 | int capi_x_intent = 0; | |||
| 6576 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6577 | int offx = 0; | |||
| 6578 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6579 | int incx = 0; | |||
| 6580 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6581 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6582 | ||||
| 6583 | /*routdebugenter*/ | |||
| 6584 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6585 | f2py_start_clock(); | |||
| 6586 | #endif | |||
| 6587 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6588 | "O|OOO:_fblas.scasum",\ | |||
| 6589 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6590 | return NULL((void*)0); | |||
| 6591 | /*frompyobj*/ | |||
| 6592 | /* Processing variable x */ | |||
| 6593 | ; | |||
| 6594 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6595 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6596 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6597 | if (!PyErr_Occurred()) | |||
| 6598 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.scasum to C/Fortran array" ); | |||
| 6599 | } else { | |||
| 6600 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6601 | ||||
| 6602 | /* Processing variable incx */ | |||
| 6603 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6604 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.scasum() 3rd keyword (incx) can't be converted to int"); | |||
| 6605 | if (f2py_success) { | |||
| 6606 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","scasum:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""scasum:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6607 | /* Processing variable offx */ | |||
| 6608 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6609 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.scasum() 2nd keyword (offx) can't be converted to int"); | |||
| 6610 | if (f2py_success) { | |||
| 6611 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","scasum:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scasum:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6612 | /* Processing variable n */ | |||
| 6613 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6614 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.scasum() 1st keyword (n) can't be converted to int"); | |||
| 6615 | if (f2py_success) { | |||
| 6616 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","scasum:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""scasum:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6617 | /* Processing variable scasum */ | |||
| 6618 | /*end of frompyobj*/ | |||
| 6619 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6620 | f2py_start_call_clock(); | |||
| 6621 | #endif | |||
| 6622 | /*callfortranroutine*/ | |||
| 6623 | (*f2py_func)(&scasum,&n,x+offx,&incx) ; | |||
| 6624 | /*(*f2py_func)(&scasum,&n,x,&offx,&incx);*/ | |||
| 6625 | if (PyErr_Occurred()) | |||
| 6626 | f2py_success = 0; | |||
| 6627 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6628 | f2py_stop_call_clock(); | |||
| 6629 | #endif | |||
| 6630 | /*end of callfortranroutine*/ | |||
| 6631 | if (f2py_success) { | |||
| 6632 | /*pyobjfrom*/ | |||
| 6633 | /*end of pyobjfrom*/ | |||
| 6634 | CFUNCSMESS("Building return value.\n"); | |||
| 6635 | capi_buildvalue = Py_BuildValue("f",scasum); | |||
| 6636 | /*closepyobjfrom*/ | |||
| 6637 | /*end of closepyobjfrom*/ | |||
| 6638 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6639 | /*cleanupfrompyobj*/ | |||
| 6640 | /* End of cleaning variable scasum */ | |||
| 6641 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6642 | } /*if (f2py_success) of n*/ | |||
| 6643 | /* End of cleaning variable n */ | |||
| 6644 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6645 | } /*if (f2py_success) of offx*/ | |||
| 6646 | /* End of cleaning variable offx */ | |||
| 6647 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6648 | } /*if (f2py_success) of incx*/ | |||
| 6649 | /* End of cleaning variable incx */ | |||
| 6650 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6651 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6652 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6653 | /* End of cleaning variable x */ | |||
| 6654 | /*end of cleanupfrompyobj*/ | |||
| 6655 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6656 | /*routdebugfailure*/ | |||
| 6657 | } else { | |||
| 6658 | /*routdebugleave*/ | |||
| 6659 | } | |||
| 6660 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6661 | /*freemem*/ | |||
| 6662 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6663 | f2py_stop_clock(); | |||
| 6664 | #endif | |||
| 6665 | return capi_buildvalue; | |||
| 6666 | } | |||
| 6667 | /******************************* end of scasum *******************************/ | |||
| 6668 | ||||
| 6669 | /*********************************** dasum ***********************************/ | |||
| 6670 | static char doc_f2py_rout__fblas_dasum[] = "\ | |||
| 6671 | s = dasum(x,[n,offx,incx])\n\nWrapper for ``dasum``.\ | |||
| 6672 | \n\nParameters\n----------\n" | |||
| 6673 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 6674 | "\nOther Parameters\n----------------\n" | |||
| 6675 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6676 | "offx : input int, optional\n Default: 0\n" | |||
| 6677 | "incx : input int, optional\n Default: 1\n" | |||
| 6678 | "\nReturns\n-------\n" | |||
| 6679 | "s : float"; | |||
| 6680 | /* extern void F_WRAPPEDFUNC(dasum,DASUM)(double*,F_INT*,double*,F_INT* ); */ | |||
| 6681 | static PyObject *f2py_rout__fblas_dasum(const PyObject *capi_self, | |||
| 6682 | PyObject *capi_args, | |||
| 6683 | PyObject *capi_keywds, | |||
| 6684 | void (*f2py_func)(double*,F_INTint*,double*,F_INTint* )) { | |||
| 6685 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6686 | volatile int f2py_success = 1; | |||
| 6687 | /*decl*/ | |||
| 6688 | ||||
| 6689 | double dasum = 0; | |||
| 6690 | int n = 0; | |||
| 6691 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6692 | double *x = NULL((void*)0); | |||
| 6693 | npy_intp x_Dims[1] = {-1}; | |||
| 6694 | const int x_Rank = 1; | |||
| 6695 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6696 | int capi_x_intent = 0; | |||
| 6697 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6698 | int offx = 0; | |||
| 6699 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6700 | int incx = 0; | |||
| 6701 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6702 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6703 | ||||
| 6704 | /*routdebugenter*/ | |||
| 6705 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6706 | f2py_start_clock(); | |||
| 6707 | #endif | |||
| 6708 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6709 | "O|OOO:_fblas.dasum",\ | |||
| 6710 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6711 | return NULL((void*)0); | |||
| 6712 | /*frompyobj*/ | |||
| 6713 | /* Processing variable x */ | |||
| 6714 | ; | |||
| 6715 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6716 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6717 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6718 | if (!PyErr_Occurred()) | |||
| 6719 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.dasum to C/Fortran array" ); | |||
| 6720 | } else { | |||
| 6721 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6722 | ||||
| 6723 | /* Processing variable incx */ | |||
| 6724 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6725 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dasum() 3rd keyword (incx) can't be converted to int"); | |||
| 6726 | if (f2py_success) { | |||
| 6727 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dasum:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dasum:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6728 | /* Processing variable offx */ | |||
| 6729 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6730 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dasum() 2nd keyword (offx) can't be converted to int"); | |||
| 6731 | if (f2py_success) { | |||
| 6732 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dasum:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dasum:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6733 | /* Processing variable n */ | |||
| 6734 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6735 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dasum() 1st keyword (n) can't be converted to int"); | |||
| 6736 | if (f2py_success) { | |||
| 6737 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dasum:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dasum:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6738 | /* Processing variable dasum */ | |||
| 6739 | /*end of frompyobj*/ | |||
| 6740 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6741 | f2py_start_call_clock(); | |||
| 6742 | #endif | |||
| 6743 | /*callfortranroutine*/ | |||
| 6744 | (*f2py_func)(&dasum,&n,x+offx,&incx) ; | |||
| 6745 | /*(*f2py_func)(&dasum,&n,x,&offx,&incx);*/ | |||
| 6746 | if (PyErr_Occurred()) | |||
| 6747 | f2py_success = 0; | |||
| 6748 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6749 | f2py_stop_call_clock(); | |||
| 6750 | #endif | |||
| 6751 | /*end of callfortranroutine*/ | |||
| 6752 | if (f2py_success) { | |||
| 6753 | /*pyobjfrom*/ | |||
| 6754 | /*end of pyobjfrom*/ | |||
| 6755 | CFUNCSMESS("Building return value.\n"); | |||
| 6756 | capi_buildvalue = Py_BuildValue("d",dasum); | |||
| 6757 | /*closepyobjfrom*/ | |||
| 6758 | /*end of closepyobjfrom*/ | |||
| 6759 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6760 | /*cleanupfrompyobj*/ | |||
| 6761 | /* End of cleaning variable dasum */ | |||
| 6762 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6763 | } /*if (f2py_success) of n*/ | |||
| 6764 | /* End of cleaning variable n */ | |||
| 6765 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6766 | } /*if (f2py_success) of offx*/ | |||
| 6767 | /* End of cleaning variable offx */ | |||
| 6768 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6769 | } /*if (f2py_success) of incx*/ | |||
| 6770 | /* End of cleaning variable incx */ | |||
| 6771 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6772 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6773 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6774 | /* End of cleaning variable x */ | |||
| 6775 | /*end of cleanupfrompyobj*/ | |||
| 6776 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6777 | /*routdebugfailure*/ | |||
| 6778 | } else { | |||
| 6779 | /*routdebugleave*/ | |||
| 6780 | } | |||
| 6781 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6782 | /*freemem*/ | |||
| 6783 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6784 | f2py_stop_clock(); | |||
| 6785 | #endif | |||
| 6786 | return capi_buildvalue; | |||
| 6787 | } | |||
| 6788 | /******************************** end of dasum ********************************/ | |||
| 6789 | ||||
| 6790 | /*********************************** dzasum ***********************************/ | |||
| 6791 | static char doc_f2py_rout__fblas_dzasum[] = "\ | |||
| 6792 | s = dzasum(x,[n,offx,incx])\n\nWrapper for ``dzasum``.\ | |||
| 6793 | \n\nParameters\n----------\n" | |||
| 6794 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 6795 | "\nOther Parameters\n----------------\n" | |||
| 6796 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6797 | "offx : input int, optional\n Default: 0\n" | |||
| 6798 | "incx : input int, optional\n Default: 1\n" | |||
| 6799 | "\nReturns\n-------\n" | |||
| 6800 | "s : float"; | |||
| 6801 | /* extern void F_WRAPPEDFUNC(dzasum,DZASUM)(double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 6802 | static PyObject *f2py_rout__fblas_dzasum(const PyObject *capi_self, | |||
| 6803 | PyObject *capi_args, | |||
| 6804 | PyObject *capi_keywds, | |||
| 6805 | void (*f2py_func)(double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 6806 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6807 | volatile int f2py_success = 1; | |||
| 6808 | /*decl*/ | |||
| 6809 | ||||
| 6810 | double dzasum = 0; | |||
| 6811 | int n = 0; | |||
| 6812 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6813 | complex_double *x = NULL((void*)0); | |||
| 6814 | npy_intp x_Dims[1] = {-1}; | |||
| 6815 | const int x_Rank = 1; | |||
| 6816 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6817 | int capi_x_intent = 0; | |||
| 6818 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6819 | int offx = 0; | |||
| 6820 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6821 | int incx = 0; | |||
| 6822 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6823 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6824 | ||||
| 6825 | /*routdebugenter*/ | |||
| 6826 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6827 | f2py_start_clock(); | |||
| 6828 | #endif | |||
| 6829 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6830 | "O|OOO:_fblas.dzasum",\ | |||
| 6831 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6832 | return NULL((void*)0); | |||
| 6833 | /*frompyobj*/ | |||
| 6834 | /* Processing variable x */ | |||
| 6835 | ; | |||
| 6836 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6837 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6838 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6839 | if (!PyErr_Occurred()) | |||
| 6840 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.dzasum to C/Fortran array" ); | |||
| 6841 | } else { | |||
| 6842 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6843 | ||||
| 6844 | /* Processing variable incx */ | |||
| 6845 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6846 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dzasum() 3rd keyword (incx) can't be converted to int"); | |||
| 6847 | if (f2py_success) { | |||
| 6848 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","dzasum:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dzasum:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6849 | /* Processing variable offx */ | |||
| 6850 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6851 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dzasum() 2nd keyword (offx) can't be converted to int"); | |||
| 6852 | if (f2py_success) { | |||
| 6853 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","dzasum:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dzasum:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6854 | /* Processing variable n */ | |||
| 6855 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6856 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dzasum() 1st keyword (n) can't be converted to int"); | |||
| 6857 | if (f2py_success) { | |||
| 6858 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","dzasum:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dzasum:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6859 | /* Processing variable dzasum */ | |||
| 6860 | /*end of frompyobj*/ | |||
| 6861 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6862 | f2py_start_call_clock(); | |||
| 6863 | #endif | |||
| 6864 | /*callfortranroutine*/ | |||
| 6865 | (*f2py_func)(&dzasum,&n,x+offx,&incx) ; | |||
| 6866 | /*(*f2py_func)(&dzasum,&n,x,&offx,&incx);*/ | |||
| 6867 | if (PyErr_Occurred()) | |||
| 6868 | f2py_success = 0; | |||
| 6869 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6870 | f2py_stop_call_clock(); | |||
| 6871 | #endif | |||
| 6872 | /*end of callfortranroutine*/ | |||
| 6873 | if (f2py_success) { | |||
| 6874 | /*pyobjfrom*/ | |||
| 6875 | /*end of pyobjfrom*/ | |||
| 6876 | CFUNCSMESS("Building return value.\n"); | |||
| 6877 | capi_buildvalue = Py_BuildValue("d",dzasum); | |||
| 6878 | /*closepyobjfrom*/ | |||
| 6879 | /*end of closepyobjfrom*/ | |||
| 6880 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 6881 | /*cleanupfrompyobj*/ | |||
| 6882 | /* End of cleaning variable dzasum */ | |||
| 6883 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 6884 | } /*if (f2py_success) of n*/ | |||
| 6885 | /* End of cleaning variable n */ | |||
| 6886 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 6887 | } /*if (f2py_success) of offx*/ | |||
| 6888 | /* End of cleaning variable offx */ | |||
| 6889 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 6890 | } /*if (f2py_success) of incx*/ | |||
| 6891 | /* End of cleaning variable incx */ | |||
| 6892 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 6893 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 6894 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 6895 | /* End of cleaning variable x */ | |||
| 6896 | /*end of cleanupfrompyobj*/ | |||
| 6897 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 6898 | /*routdebugfailure*/ | |||
| 6899 | } else { | |||
| 6900 | /*routdebugleave*/ | |||
| 6901 | } | |||
| 6902 | CFUNCSMESS("Freeing memory.\n"); | |||
| 6903 | /*freemem*/ | |||
| 6904 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6905 | f2py_stop_clock(); | |||
| 6906 | #endif | |||
| 6907 | return capi_buildvalue; | |||
| 6908 | } | |||
| 6909 | /******************************* end of dzasum *******************************/ | |||
| 6910 | ||||
| 6911 | /*********************************** isamax ***********************************/ | |||
| 6912 | static char doc_f2py_rout__fblas_isamax[] = "\ | |||
| 6913 | k = isamax(x,[n,offx,incx])\n\nWrapper for ``isamax``.\ | |||
| 6914 | \n\nParameters\n----------\n" | |||
| 6915 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 6916 | "\nOther Parameters\n----------------\n" | |||
| 6917 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 6918 | "offx : input int, optional\n Default: 0\n" | |||
| 6919 | "incx : input int, optional\n Default: 1\n" | |||
| 6920 | "\nReturns\n-------\n" | |||
| 6921 | "k : int"; | |||
| 6922 | /* extern int F_FUNC(isamax,ISAMAX) (F_INT*,float*,F_INT* ); */ | |||
| 6923 | static PyObject *f2py_rout__fblas_isamax(const PyObject *capi_self, | |||
| 6924 | PyObject *capi_args, | |||
| 6925 | PyObject *capi_keywds, | |||
| 6926 | int (*f2py_func)(F_INTint*,float*,F_INTint* )) { | |||
| 6927 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 6928 | volatile int f2py_success = 1; | |||
| 6929 | /*decl*/ | |||
| 6930 | ||||
| 6931 | int isamax_return_value=0; | |||
| 6932 | int n = 0; | |||
| 6933 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 6934 | float *x = NULL((void*)0); | |||
| 6935 | npy_intp x_Dims[1] = {-1}; | |||
| 6936 | const int x_Rank = 1; | |||
| 6937 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 6938 | int capi_x_intent = 0; | |||
| 6939 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 6940 | int offx = 0; | |||
| 6941 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 6942 | int incx = 0; | |||
| 6943 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 6944 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 6945 | ||||
| 6946 | /*routdebugenter*/ | |||
| 6947 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6948 | f2py_start_clock(); | |||
| 6949 | #endif | |||
| 6950 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 6951 | "O|OOO:_fblas.isamax",\ | |||
| 6952 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 6953 | return NULL((void*)0); | |||
| 6954 | /*frompyobj*/ | |||
| 6955 | /* Processing variable x */ | |||
| 6956 | ; | |||
| 6957 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 6958 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 6959 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 6960 | if (!PyErr_Occurred()) | |||
| 6961 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.isamax to C/Fortran array" ); | |||
| 6962 | } else { | |||
| 6963 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 6964 | ||||
| 6965 | /* Processing variable incx */ | |||
| 6966 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 6967 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.isamax() 3rd keyword (incx) can't be converted to int"); | |||
| 6968 | if (f2py_success) { | |||
| 6969 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","isamax:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""isamax:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 6970 | /* Processing variable offx */ | |||
| 6971 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 6972 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.isamax() 2nd keyword (offx) can't be converted to int"); | |||
| 6973 | if (f2py_success) { | |||
| 6974 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","isamax:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""isamax:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6975 | /* Processing variable n */ | |||
| 6976 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 6977 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.isamax() 1st keyword (n) can't be converted to int"); | |||
| 6978 | if (f2py_success) { | |||
| 6979 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","isamax:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""isamax:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 6980 | /*end of frompyobj*/ | |||
| 6981 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6982 | f2py_start_call_clock(); | |||
| 6983 | #endif | |||
| 6984 | /*callfortranroutine*/ | |||
| 6985 | isamax_return_value = (*f2py_func)(&n,x+offx,&incx) - 1 ; | |||
| 6986 | /* isamax_return_value = (*f2py_func)(&n,x,&offx,&incx);*/ | |||
| 6987 | ||||
| 6988 | if (PyErr_Occurred()) | |||
| 6989 | f2py_success = 0; | |||
| 6990 | #ifdef F2PY_REPORT_ATEXIT | |||
| 6991 | f2py_stop_call_clock(); | |||
| 6992 | #endif | |||
| 6993 | /*end of callfortranroutine*/ | |||
| 6994 | if (f2py_success) { | |||
| 6995 | /*pyobjfrom*/ | |||
| 6996 | /*end of pyobjfrom*/ | |||
| 6997 | CFUNCSMESS("Building return value.\n"); | |||
| 6998 | capi_buildvalue = Py_BuildValue("i",isamax_return_value); | |||
| 6999 | /*closepyobjfrom*/ | |||
| 7000 | /*end of closepyobjfrom*/ | |||
| 7001 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 7002 | /*cleanupfrompyobj*/ | |||
| 7003 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 7004 | } /*if (f2py_success) of n*/ | |||
| 7005 | /* End of cleaning variable n */ | |||
| 7006 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 7007 | } /*if (f2py_success) of offx*/ | |||
| 7008 | /* End of cleaning variable offx */ | |||
| 7009 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 7010 | } /*if (f2py_success) of incx*/ | |||
| 7011 | /* End of cleaning variable incx */ | |||
| 7012 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 7013 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 7014 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 7015 | /* End of cleaning variable x */ | |||
| 7016 | /*end of cleanupfrompyobj*/ | |||
| 7017 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 7018 | /*routdebugfailure*/ | |||
| 7019 | } else { | |||
| 7020 | /*routdebugleave*/ | |||
| 7021 | } | |||
| 7022 | CFUNCSMESS("Freeing memory.\n"); | |||
| 7023 | /*freemem*/ | |||
| 7024 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7025 | f2py_stop_clock(); | |||
| 7026 | #endif | |||
| 7027 | return capi_buildvalue; | |||
| 7028 | } | |||
| 7029 | /******************************* end of isamax *******************************/ | |||
| 7030 | ||||
| 7031 | /*********************************** idamax ***********************************/ | |||
| 7032 | static char doc_f2py_rout__fblas_idamax[] = "\ | |||
| 7033 | k = idamax(x,[n,offx,incx])\n\nWrapper for ``idamax``.\ | |||
| 7034 | \n\nParameters\n----------\n" | |||
| 7035 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 7036 | "\nOther Parameters\n----------------\n" | |||
| 7037 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 7038 | "offx : input int, optional\n Default: 0\n" | |||
| 7039 | "incx : input int, optional\n Default: 1\n" | |||
| 7040 | "\nReturns\n-------\n" | |||
| 7041 | "k : int"; | |||
| 7042 | /* extern int F_FUNC(idamax,IDAMAX) (F_INT*,double*,F_INT* ); */ | |||
| 7043 | static PyObject *f2py_rout__fblas_idamax(const PyObject *capi_self, | |||
| 7044 | PyObject *capi_args, | |||
| 7045 | PyObject *capi_keywds, | |||
| 7046 | int (*f2py_func)(F_INTint*,double*,F_INTint* )) { | |||
| 7047 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 7048 | volatile int f2py_success = 1; | |||
| 7049 | /*decl*/ | |||
| 7050 | ||||
| 7051 | int idamax_return_value=0; | |||
| 7052 | int n = 0; | |||
| 7053 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 7054 | double *x = NULL((void*)0); | |||
| 7055 | npy_intp x_Dims[1] = {-1}; | |||
| 7056 | const int x_Rank = 1; | |||
| 7057 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 7058 | int capi_x_intent = 0; | |||
| 7059 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 7060 | int offx = 0; | |||
| 7061 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 7062 | int incx = 0; | |||
| 7063 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 7064 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 7065 | ||||
| 7066 | /*routdebugenter*/ | |||
| 7067 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7068 | f2py_start_clock(); | |||
| 7069 | #endif | |||
| 7070 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 7071 | "O|OOO:_fblas.idamax",\ | |||
| 7072 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 7073 | return NULL((void*)0); | |||
| 7074 | /*frompyobj*/ | |||
| 7075 | /* Processing variable x */ | |||
| 7076 | ; | |||
| 7077 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 7078 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 7079 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 7080 | if (!PyErr_Occurred()) | |||
| 7081 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.idamax to C/Fortran array" ); | |||
| 7082 | } else { | |||
| 7083 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 7084 | ||||
| 7085 | /* Processing variable incx */ | |||
| 7086 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 7087 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.idamax() 3rd keyword (incx) can't be converted to int"); | |||
| 7088 | if (f2py_success) { | |||
| 7089 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","idamax:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""idamax:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7090 | /* Processing variable offx */ | |||
| 7091 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 7092 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.idamax() 2nd keyword (offx) can't be converted to int"); | |||
| 7093 | if (f2py_success) { | |||
| 7094 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","idamax:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""idamax:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7095 | /* Processing variable n */ | |||
| 7096 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 7097 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.idamax() 1st keyword (n) can't be converted to int"); | |||
| 7098 | if (f2py_success) { | |||
| 7099 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","idamax:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""idamax:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7100 | /*end of frompyobj*/ | |||
| 7101 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7102 | f2py_start_call_clock(); | |||
| 7103 | #endif | |||
| 7104 | /*callfortranroutine*/ | |||
| 7105 | idamax_return_value = (*f2py_func)(&n,x+offx,&incx) - 1 ; | |||
| 7106 | /* idamax_return_value = (*f2py_func)(&n,x,&offx,&incx);*/ | |||
| 7107 | ||||
| 7108 | if (PyErr_Occurred()) | |||
| 7109 | f2py_success = 0; | |||
| 7110 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7111 | f2py_stop_call_clock(); | |||
| 7112 | #endif | |||
| 7113 | /*end of callfortranroutine*/ | |||
| 7114 | if (f2py_success) { | |||
| 7115 | /*pyobjfrom*/ | |||
| 7116 | /*end of pyobjfrom*/ | |||
| 7117 | CFUNCSMESS("Building return value.\n"); | |||
| 7118 | capi_buildvalue = Py_BuildValue("i",idamax_return_value); | |||
| 7119 | /*closepyobjfrom*/ | |||
| 7120 | /*end of closepyobjfrom*/ | |||
| 7121 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 7122 | /*cleanupfrompyobj*/ | |||
| 7123 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 7124 | } /*if (f2py_success) of n*/ | |||
| 7125 | /* End of cleaning variable n */ | |||
| 7126 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 7127 | } /*if (f2py_success) of offx*/ | |||
| 7128 | /* End of cleaning variable offx */ | |||
| 7129 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 7130 | } /*if (f2py_success) of incx*/ | |||
| 7131 | /* End of cleaning variable incx */ | |||
| 7132 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 7133 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 7134 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 7135 | /* End of cleaning variable x */ | |||
| 7136 | /*end of cleanupfrompyobj*/ | |||
| 7137 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 7138 | /*routdebugfailure*/ | |||
| 7139 | } else { | |||
| 7140 | /*routdebugleave*/ | |||
| 7141 | } | |||
| 7142 | CFUNCSMESS("Freeing memory.\n"); | |||
| 7143 | /*freemem*/ | |||
| 7144 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7145 | f2py_stop_clock(); | |||
| 7146 | #endif | |||
| 7147 | return capi_buildvalue; | |||
| 7148 | } | |||
| 7149 | /******************************* end of idamax *******************************/ | |||
| 7150 | ||||
| 7151 | /*********************************** icamax ***********************************/ | |||
| 7152 | static char doc_f2py_rout__fblas_icamax[] = "\ | |||
| 7153 | k = icamax(x,[n,offx,incx])\n\nWrapper for ``icamax``.\ | |||
| 7154 | \n\nParameters\n----------\n" | |||
| 7155 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 7156 | "\nOther Parameters\n----------------\n" | |||
| 7157 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 7158 | "offx : input int, optional\n Default: 0\n" | |||
| 7159 | "incx : input int, optional\n Default: 1\n" | |||
| 7160 | "\nReturns\n-------\n" | |||
| 7161 | "k : int"; | |||
| 7162 | /* extern int F_FUNC(icamax,ICAMAX) (F_INT*,complex_float*,F_INT* ); */ | |||
| 7163 | static PyObject *f2py_rout__fblas_icamax(const PyObject *capi_self, | |||
| 7164 | PyObject *capi_args, | |||
| 7165 | PyObject *capi_keywds, | |||
| 7166 | int (*f2py_func)(F_INTint*,complex_float*,F_INTint* )) { | |||
| 7167 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 7168 | volatile int f2py_success = 1; | |||
| 7169 | /*decl*/ | |||
| 7170 | ||||
| 7171 | int icamax_return_value=0; | |||
| 7172 | int n = 0; | |||
| 7173 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 7174 | complex_float *x = NULL((void*)0); | |||
| 7175 | npy_intp x_Dims[1] = {-1}; | |||
| 7176 | const int x_Rank = 1; | |||
| 7177 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 7178 | int capi_x_intent = 0; | |||
| 7179 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 7180 | int offx = 0; | |||
| 7181 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 7182 | int incx = 0; | |||
| 7183 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 7184 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 7185 | ||||
| 7186 | /*routdebugenter*/ | |||
| 7187 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7188 | f2py_start_clock(); | |||
| 7189 | #endif | |||
| 7190 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 7191 | "O|OOO:_fblas.icamax",\ | |||
| 7192 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 7193 | return NULL((void*)0); | |||
| 7194 | /*frompyobj*/ | |||
| 7195 | /* Processing variable x */ | |||
| 7196 | ; | |||
| 7197 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 7198 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 7199 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 7200 | if (!PyErr_Occurred()) | |||
| 7201 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.icamax to C/Fortran array" ); | |||
| 7202 | } else { | |||
| 7203 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 7204 | ||||
| 7205 | /* Processing variable incx */ | |||
| 7206 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 7207 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.icamax() 3rd keyword (incx) can't be converted to int"); | |||
| 7208 | if (f2py_success) { | |||
| 7209 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","icamax:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""icamax:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7210 | /* Processing variable offx */ | |||
| 7211 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 7212 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.icamax() 2nd keyword (offx) can't be converted to int"); | |||
| 7213 | if (f2py_success) { | |||
| 7214 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","icamax:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""icamax:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7215 | /* Processing variable n */ | |||
| 7216 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 7217 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.icamax() 1st keyword (n) can't be converted to int"); | |||
| 7218 | if (f2py_success) { | |||
| 7219 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","icamax:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""icamax:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7220 | /*end of frompyobj*/ | |||
| 7221 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7222 | f2py_start_call_clock(); | |||
| 7223 | #endif | |||
| 7224 | /*callfortranroutine*/ | |||
| 7225 | icamax_return_value = (*f2py_func)(&n,x+offx,&incx) - 1 ; | |||
| 7226 | /* icamax_return_value = (*f2py_func)(&n,x,&offx,&incx);*/ | |||
| 7227 | ||||
| 7228 | if (PyErr_Occurred()) | |||
| 7229 | f2py_success = 0; | |||
| 7230 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7231 | f2py_stop_call_clock(); | |||
| 7232 | #endif | |||
| 7233 | /*end of callfortranroutine*/ | |||
| 7234 | if (f2py_success) { | |||
| 7235 | /*pyobjfrom*/ | |||
| 7236 | /*end of pyobjfrom*/ | |||
| 7237 | CFUNCSMESS("Building return value.\n"); | |||
| 7238 | capi_buildvalue = Py_BuildValue("i",icamax_return_value); | |||
| 7239 | /*closepyobjfrom*/ | |||
| 7240 | /*end of closepyobjfrom*/ | |||
| 7241 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 7242 | /*cleanupfrompyobj*/ | |||
| 7243 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 7244 | } /*if (f2py_success) of n*/ | |||
| 7245 | /* End of cleaning variable n */ | |||
| 7246 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 7247 | } /*if (f2py_success) of offx*/ | |||
| 7248 | /* End of cleaning variable offx */ | |||
| 7249 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 7250 | } /*if (f2py_success) of incx*/ | |||
| 7251 | /* End of cleaning variable incx */ | |||
| 7252 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 7253 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 7254 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 7255 | /* End of cleaning variable x */ | |||
| 7256 | /*end of cleanupfrompyobj*/ | |||
| 7257 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 7258 | /*routdebugfailure*/ | |||
| 7259 | } else { | |||
| 7260 | /*routdebugleave*/ | |||
| 7261 | } | |||
| 7262 | CFUNCSMESS("Freeing memory.\n"); | |||
| 7263 | /*freemem*/ | |||
| 7264 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7265 | f2py_stop_clock(); | |||
| 7266 | #endif | |||
| 7267 | return capi_buildvalue; | |||
| 7268 | } | |||
| 7269 | /******************************* end of icamax *******************************/ | |||
| 7270 | ||||
| 7271 | /*********************************** izamax ***********************************/ | |||
| 7272 | static char doc_f2py_rout__fblas_izamax[] = "\ | |||
| 7273 | k = izamax(x,[n,offx,incx])\n\nWrapper for ``izamax``.\ | |||
| 7274 | \n\nParameters\n----------\n" | |||
| 7275 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 7276 | "\nOther Parameters\n----------------\n" | |||
| 7277 | "n : input int, optional\n Default: (len(x)-offx)/abs(incx)\n" | |||
| 7278 | "offx : input int, optional\n Default: 0\n" | |||
| 7279 | "incx : input int, optional\n Default: 1\n" | |||
| 7280 | "\nReturns\n-------\n" | |||
| 7281 | "k : int"; | |||
| 7282 | /* extern int F_FUNC(izamax,IZAMAX) (F_INT*,complex_double*,F_INT* ); */ | |||
| 7283 | static PyObject *f2py_rout__fblas_izamax(const PyObject *capi_self, | |||
| 7284 | PyObject *capi_args, | |||
| 7285 | PyObject *capi_keywds, | |||
| 7286 | int (*f2py_func)(F_INTint*,complex_double*,F_INTint* )) { | |||
| 7287 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 7288 | volatile int f2py_success = 1; | |||
| 7289 | /*decl*/ | |||
| 7290 | ||||
| 7291 | int izamax_return_value=0; | |||
| 7292 | int n = 0; | |||
| 7293 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 7294 | complex_double *x = NULL((void*)0); | |||
| 7295 | npy_intp x_Dims[1] = {-1}; | |||
| 7296 | const int x_Rank = 1; | |||
| 7297 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 7298 | int capi_x_intent = 0; | |||
| 7299 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 7300 | int offx = 0; | |||
| 7301 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 7302 | int incx = 0; | |||
| 7303 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 7304 | static char *capi_kwlist[] = {"x","n","offx","incx",NULL((void*)0)}; | |||
| 7305 | ||||
| 7306 | /*routdebugenter*/ | |||
| 7307 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7308 | f2py_start_clock(); | |||
| 7309 | #endif | |||
| 7310 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 7311 | "O|OOO:_fblas.izamax",\ | |||
| 7312 | capi_kwlist,&x_capi,&n_capi,&offx_capi,&incx_capi)) | |||
| 7313 | return NULL((void*)0); | |||
| 7314 | /*frompyobj*/ | |||
| 7315 | /* Processing variable x */ | |||
| 7316 | ; | |||
| 7317 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 7318 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 7319 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 7320 | if (!PyErr_Occurred()) | |||
| 7321 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `x' of _fblas.izamax to C/Fortran array" ); | |||
| 7322 | } else { | |||
| 7323 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 7324 | ||||
| 7325 | /* Processing variable incx */ | |||
| 7326 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 7327 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.izamax() 3rd keyword (incx) can't be converted to int"); | |||
| 7328 | if (f2py_success) { | |||
| 7329 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","3rd keyword incx","izamax:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""izamax:incx=%d", "(""incx>0||incx<0"") failed for " "3rd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7330 | /* Processing variable offx */ | |||
| 7331 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 7332 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.izamax() 2nd keyword (offx) can't be converted to int"); | |||
| 7333 | if (f2py_success) { | |||
| 7334 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd keyword offx","izamax:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""izamax:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""2nd keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7335 | /* Processing variable n */ | |||
| 7336 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-offx)/abs(incx); else | |||
| 7337 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.izamax() 1st keyword (n) can't be converted to int"); | |||
| 7338 | if (f2py_success) { | |||
| 7339 | CHECKSCALAR(len(x)-offx>(n-1)*abs(incx),"len(x)-offx>(n-1)*abs(incx)","1st keyword n","izamax:n=%d",n)if (!(x_Dims[0]-offx>(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""izamax:n=%d", "(""len(x)-offx>(n-1)*abs(incx)" ") failed for ""1st keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7340 | /*end of frompyobj*/ | |||
| 7341 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7342 | f2py_start_call_clock(); | |||
| 7343 | #endif | |||
| 7344 | /*callfortranroutine*/ | |||
| 7345 | izamax_return_value = (*f2py_func)(&n,x+offx,&incx) - 1 ; | |||
| 7346 | /* izamax_return_value = (*f2py_func)(&n,x,&offx,&incx);*/ | |||
| 7347 | ||||
| 7348 | if (PyErr_Occurred()) | |||
| 7349 | f2py_success = 0; | |||
| 7350 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7351 | f2py_stop_call_clock(); | |||
| 7352 | #endif | |||
| 7353 | /*end of callfortranroutine*/ | |||
| 7354 | if (f2py_success) { | |||
| 7355 | /*pyobjfrom*/ | |||
| 7356 | /*end of pyobjfrom*/ | |||
| 7357 | CFUNCSMESS("Building return value.\n"); | |||
| 7358 | capi_buildvalue = Py_BuildValue("i",izamax_return_value); | |||
| 7359 | /*closepyobjfrom*/ | |||
| 7360 | /*end of closepyobjfrom*/ | |||
| 7361 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 7362 | /*cleanupfrompyobj*/ | |||
| 7363 | } /*CHECKSCALAR(len(x)-offx>(n-1)*abs(incx))*/ | |||
| 7364 | } /*if (f2py_success) of n*/ | |||
| 7365 | /* End of cleaning variable n */ | |||
| 7366 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 7367 | } /*if (f2py_success) of offx*/ | |||
| 7368 | /* End of cleaning variable offx */ | |||
| 7369 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 7370 | } /*if (f2py_success) of incx*/ | |||
| 7371 | /* End of cleaning variable incx */ | |||
| 7372 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 7373 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 7374 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 7375 | /* End of cleaning variable x */ | |||
| 7376 | /*end of cleanupfrompyobj*/ | |||
| 7377 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 7378 | /*routdebugfailure*/ | |||
| 7379 | } else { | |||
| 7380 | /*routdebugleave*/ | |||
| 7381 | } | |||
| 7382 | CFUNCSMESS("Freeing memory.\n"); | |||
| 7383 | /*freemem*/ | |||
| 7384 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7385 | f2py_stop_clock(); | |||
| 7386 | #endif | |||
| 7387 | return capi_buildvalue; | |||
| 7388 | } | |||
| 7389 | /******************************* end of izamax *******************************/ | |||
| 7390 | ||||
| 7391 | /*********************************** sgemv ***********************************/ | |||
| 7392 | static char doc_f2py_rout__fblas_sgemv[] = "\ | |||
| 7393 | y = sgemv(alpha,a,x,[beta,y,offx,incx,offy,incy,trans,overwrite_y])\n\nWrapper for ``sgemv``.\ | |||
| 7394 | \n\nParameters\n----------\n" | |||
| 7395 | "alpha : input float\n" | |||
| 7396 | "a : input rank-2 array('f') with bounds (m,n)\n" | |||
| 7397 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 7398 | "\nOther Parameters\n----------------\n" | |||
| 7399 | "beta : input float, optional\n Default: 0.0\n" | |||
| 7400 | "y : input rank-1 array('f') with bounds (ly)\n" | |||
| 7401 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 7402 | "offx : input int, optional\n Default: 0\n" | |||
| 7403 | "incx : input int, optional\n Default: 1\n" | |||
| 7404 | "offy : input int, optional\n Default: 0\n" | |||
| 7405 | "incy : input int, optional\n Default: 1\n" | |||
| 7406 | "trans : input int, optional\n Default: 0\n" | |||
| 7407 | "\nReturns\n-------\n" | |||
| 7408 | "y : rank-1 array('f') with bounds (ly)"; | |||
| 7409 | /* extern void F_FUNC(sgemv,SGEMV)(char*,F_INT*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*, float*,F_INT* ); */ | |||
| 7410 | static PyObject *f2py_rout__fblas_sgemv(const PyObject *capi_self, | |||
| 7411 | PyObject *capi_args, | |||
| 7412 | PyObject *capi_keywds, | |||
| 7413 | void (*f2py_func)(char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*, float*,F_INTint* )) { | |||
| 7414 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 7415 | volatile int f2py_success = 1; | |||
| 7416 | /*decl*/ | |||
| 7417 | ||||
| 7418 | int m = 0; | |||
| 7419 | int n = 0; | |||
| 7420 | float alpha = 0; | |||
| 7421 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 7422 | float *a = NULL((void*)0); | |||
| 7423 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 7424 | const int a_Rank = 2; | |||
| 7425 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 7426 | int capi_a_intent = 0; | |||
| 7427 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 7428 | float *x = NULL((void*)0); | |||
| 7429 | npy_intp x_Dims[1] = {-1}; | |||
| 7430 | const int x_Rank = 1; | |||
| 7431 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 7432 | int capi_x_intent = 0; | |||
| 7433 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 7434 | float beta = 0; | |||
| 7435 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 7436 | float *y = NULL((void*)0); | |||
| 7437 | npy_intp y_Dims[1] = {-1}; | |||
| 7438 | const int y_Rank = 1; | |||
| 7439 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 7440 | int capi_y_intent = 0; | |||
| 7441 | int capi_overwrite_y = 0; | |||
| 7442 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 7443 | int offx = 0; | |||
| 7444 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 7445 | int incx = 0; | |||
| 7446 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 7447 | int offy = 0; | |||
| 7448 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 7449 | int incy = 0; | |||
| 7450 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 7451 | int trans = 0; | |||
| 7452 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 7453 | int rows = 0; | |||
| 7454 | int cols = 0; | |||
| 7455 | int ly = 0; | |||
| 7456 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","trans","overwrite_y",NULL((void*)0)}; | |||
| 7457 | ||||
| 7458 | /*routdebugenter*/ | |||
| 7459 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7460 | f2py_start_clock(); | |||
| 7461 | #endif | |||
| 7462 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 7463 | "OOO|OOOOOOOi:_fblas.sgemv",\ | |||
| 7464 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 7465 | return NULL((void*)0); | |||
| 7466 | /*frompyobj*/ | |||
| 7467 | /* Processing variable trans */ | |||
| 7468 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 7469 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.sgemv() 7th keyword (trans) can't be converted to int"); | |||
| 7470 | if (f2py_success) { | |||
| 7471 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","sgemv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sgemv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7472 | /* Processing variable incx */ | |||
| 7473 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 7474 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sgemv() 4th keyword (incx) can't be converted to int"); | |||
| 7475 | if (f2py_success) { | |||
| 7476 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","sgemv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgemv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7477 | /* Processing variable incy */ | |||
| 7478 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 7479 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sgemv() 6th keyword (incy) can't be converted to int"); | |||
| 7480 | if (f2py_success) { | |||
| 7481 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","sgemv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgemv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7482 | /* Processing variable alpha */ | |||
| 7483 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sgemv() 1st argument (alpha) can't be converted to float"); | |||
| 7484 | if (f2py_success) { | |||
| 7485 | /* Processing variable beta */ | |||
| 7486 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 7487 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.sgemv() 1st keyword (beta) can't be converted to float"); | |||
| 7488 | if (f2py_success) { | |||
| 7489 | /* Processing variable a */ | |||
| 7490 | ; | |||
| 7491 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 7492 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 7493 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 7494 | if (!PyErr_Occurred()) | |||
| 7495 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.sgemv to C/Fortran array" ); | |||
| 7496 | } else { | |||
| 7497 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 7498 | ||||
| 7499 | /* Processing variable offx */ | |||
| 7500 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 7501 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sgemv() 3rd keyword (offx) can't be converted to int"); | |||
| 7502 | if (f2py_success) { | |||
| 7503 | /* Processing variable offy */ | |||
| 7504 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 7505 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.sgemv() 5th keyword (offy) can't be converted to int"); | |||
| 7506 | if (f2py_success) { | |||
| 7507 | /* Processing variable m */ | |||
| 7508 | m = shape(a,0)a_Dims[0]; | |||
| 7509 | /* Processing variable n */ | |||
| 7510 | n = shape(a,1)a_Dims[1]; | |||
| 7511 | /* Processing variable rows */ | |||
| 7512 | rows = (trans?n:m); | |||
| 7513 | /* Processing variable cols */ | |||
| 7514 | cols = (trans?m:n); | |||
| 7515 | /* Processing variable x */ | |||
| 7516 | ; | |||
| 7517 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 7518 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 7519 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 7520 | if (!PyErr_Occurred()) | |||
| 7521 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.sgemv to C/Fortran array" ); | |||
| 7522 | } else { | |||
| 7523 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 7524 | ||||
| 7525 | CHECKARRAY(len(x)>offx+(cols-1)*abs(incx),"len(x)>offx+(cols-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(cols-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(cols-1)*abs(incx)"") failed for " "3rd argument x"); } else { | |||
| 7526 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 7527 | /* Processing variable ly */ | |||
| 7528 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(rows-1)*abs(incy):-1); | |||
| 7529 | /* Processing variable y */ | |||
| 7530 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 7531 | y_Dims[0]=ly; | |||
| 7532 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 7533 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 7534 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 7535 | if (!PyErr_Occurred()) | |||
| 7536 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.sgemv to C/Fortran array" ); | |||
| 7537 | } else { | |||
| 7538 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 7539 | ||||
| 7540 | CHECKARRAY(len(y)>offy+(rows-1)*abs(incy),"len(y)>offy+(rows-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(rows-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(rows-1)*abs(incy)"") failed for " "2nd keyword y"); } else { | |||
| 7541 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 7542 | /*end of frompyobj*/ | |||
| 7543 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7544 | f2py_start_call_clock(); | |||
| 7545 | #endif | |||
| 7546 | /*callfortranroutine*/ | |||
| 7547 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&alpha,a,&m, x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 7548 | /*(*f2py_func)(&m,&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&trans,&rows,&cols,&ly);*/ | |||
| 7549 | if (PyErr_Occurred()) | |||
| 7550 | f2py_success = 0; | |||
| 7551 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7552 | f2py_stop_call_clock(); | |||
| 7553 | #endif | |||
| 7554 | /*end of callfortranroutine*/ | |||
| 7555 | if (f2py_success) { | |||
| 7556 | /*pyobjfrom*/ | |||
| 7557 | /*end of pyobjfrom*/ | |||
| 7558 | CFUNCSMESS("Building return value.\n"); | |||
| 7559 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 7560 | /*closepyobjfrom*/ | |||
| 7561 | /*end of closepyobjfrom*/ | |||
| 7562 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 7563 | /*cleanupfrompyobj*/ | |||
| 7564 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 7565 | } /*CHECKARRAY(len(y)>offy+(rows-1)*abs(incy))*/ | |||
| 7566 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 7567 | /* End of cleaning variable y */ | |||
| 7568 | /* End of cleaning variable ly */ | |||
| 7569 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 7570 | } /*CHECKARRAY(len(x)>offx+(cols-1)*abs(incx))*/ | |||
| 7571 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 7572 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 7573 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 7574 | /* End of cleaning variable x */ | |||
| 7575 | /* End of cleaning variable cols */ | |||
| 7576 | /* End of cleaning variable rows */ | |||
| 7577 | /* End of cleaning variable n */ | |||
| 7578 | /* End of cleaning variable m */ | |||
| 7579 | } /*if (f2py_success) of offy*/ | |||
| 7580 | /* End of cleaning variable offy */ | |||
| 7581 | } /*if (f2py_success) of offx*/ | |||
| 7582 | /* End of cleaning variable offx */ | |||
| 7583 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 7584 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 7585 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 7586 | /* End of cleaning variable a */ | |||
| 7587 | } /*if (f2py_success) of beta*/ | |||
| 7588 | /* End of cleaning variable beta */ | |||
| 7589 | } /*if (f2py_success) of alpha*/ | |||
| 7590 | /* End of cleaning variable alpha */ | |||
| 7591 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 7592 | } /*if (f2py_success) of incy*/ | |||
| 7593 | /* End of cleaning variable incy */ | |||
| 7594 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 7595 | } /*if (f2py_success) of incx*/ | |||
| 7596 | /* End of cleaning variable incx */ | |||
| 7597 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 7598 | } /*if (f2py_success) of trans*/ | |||
| 7599 | /* End of cleaning variable trans */ | |||
| 7600 | /*end of cleanupfrompyobj*/ | |||
| 7601 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 7602 | /*routdebugfailure*/ | |||
| 7603 | } else { | |||
| 7604 | /*routdebugleave*/ | |||
| 7605 | } | |||
| 7606 | CFUNCSMESS("Freeing memory.\n"); | |||
| 7607 | /*freemem*/ | |||
| 7608 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7609 | f2py_stop_clock(); | |||
| 7610 | #endif | |||
| 7611 | return capi_buildvalue; | |||
| 7612 | } | |||
| 7613 | /******************************** end of sgemv ********************************/ | |||
| 7614 | ||||
| 7615 | /*********************************** dgemv ***********************************/ | |||
| 7616 | static char doc_f2py_rout__fblas_dgemv[] = "\ | |||
| 7617 | y = dgemv(alpha,a,x,[beta,y,offx,incx,offy,incy,trans,overwrite_y])\n\nWrapper for ``dgemv``.\ | |||
| 7618 | \n\nParameters\n----------\n" | |||
| 7619 | "alpha : input float\n" | |||
| 7620 | "a : input rank-2 array('d') with bounds (m,n)\n" | |||
| 7621 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 7622 | "\nOther Parameters\n----------------\n" | |||
| 7623 | "beta : input float, optional\n Default: 0.0\n" | |||
| 7624 | "y : input rank-1 array('d') with bounds (ly)\n" | |||
| 7625 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 7626 | "offx : input int, optional\n Default: 0\n" | |||
| 7627 | "incx : input int, optional\n Default: 1\n" | |||
| 7628 | "offy : input int, optional\n Default: 0\n" | |||
| 7629 | "incy : input int, optional\n Default: 1\n" | |||
| 7630 | "trans : input int, optional\n Default: 0\n" | |||
| 7631 | "\nReturns\n-------\n" | |||
| 7632 | "y : rank-1 array('d') with bounds (ly)"; | |||
| 7633 | /* extern void F_FUNC(dgemv,DGEMV)(char*,F_INT*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*, double*,F_INT* ); */ | |||
| 7634 | static PyObject *f2py_rout__fblas_dgemv(const PyObject *capi_self, | |||
| 7635 | PyObject *capi_args, | |||
| 7636 | PyObject *capi_keywds, | |||
| 7637 | void (*f2py_func)(char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*, double*,F_INTint* )) { | |||
| 7638 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 7639 | volatile int f2py_success = 1; | |||
| 7640 | /*decl*/ | |||
| 7641 | ||||
| 7642 | int m = 0; | |||
| 7643 | int n = 0; | |||
| 7644 | double alpha = 0; | |||
| 7645 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 7646 | double *a = NULL((void*)0); | |||
| 7647 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 7648 | const int a_Rank = 2; | |||
| 7649 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 7650 | int capi_a_intent = 0; | |||
| 7651 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 7652 | double *x = NULL((void*)0); | |||
| 7653 | npy_intp x_Dims[1] = {-1}; | |||
| 7654 | const int x_Rank = 1; | |||
| 7655 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 7656 | int capi_x_intent = 0; | |||
| 7657 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 7658 | double beta = 0; | |||
| 7659 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 7660 | double *y = NULL((void*)0); | |||
| 7661 | npy_intp y_Dims[1] = {-1}; | |||
| 7662 | const int y_Rank = 1; | |||
| 7663 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 7664 | int capi_y_intent = 0; | |||
| 7665 | int capi_overwrite_y = 0; | |||
| 7666 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 7667 | int offx = 0; | |||
| 7668 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 7669 | int incx = 0; | |||
| 7670 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 7671 | int offy = 0; | |||
| 7672 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 7673 | int incy = 0; | |||
| 7674 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 7675 | int trans = 0; | |||
| 7676 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 7677 | int rows = 0; | |||
| 7678 | int cols = 0; | |||
| 7679 | int ly = 0; | |||
| 7680 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","trans","overwrite_y",NULL((void*)0)}; | |||
| 7681 | ||||
| 7682 | /*routdebugenter*/ | |||
| 7683 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7684 | f2py_start_clock(); | |||
| 7685 | #endif | |||
| 7686 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 7687 | "OOO|OOOOOOOi:_fblas.dgemv",\ | |||
| 7688 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 7689 | return NULL((void*)0); | |||
| 7690 | /*frompyobj*/ | |||
| 7691 | /* Processing variable trans */ | |||
| 7692 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 7693 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dgemv() 7th keyword (trans) can't be converted to int"); | |||
| 7694 | if (f2py_success) { | |||
| 7695 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","dgemv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dgemv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7696 | /* Processing variable incx */ | |||
| 7697 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 7698 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dgemv() 4th keyword (incx) can't be converted to int"); | |||
| 7699 | if (f2py_success) { | |||
| 7700 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","dgemv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgemv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7701 | /* Processing variable incy */ | |||
| 7702 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 7703 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dgemv() 6th keyword (incy) can't be converted to int"); | |||
| 7704 | if (f2py_success) { | |||
| 7705 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","dgemv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgemv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7706 | /* Processing variable alpha */ | |||
| 7707 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dgemv() 1st argument (alpha) can't be converted to double"); | |||
| 7708 | if (f2py_success) { | |||
| 7709 | /* Processing variable beta */ | |||
| 7710 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 7711 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dgemv() 1st keyword (beta) can't be converted to double"); | |||
| 7712 | if (f2py_success) { | |||
| 7713 | /* Processing variable a */ | |||
| 7714 | ; | |||
| 7715 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 7716 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 7717 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 7718 | if (!PyErr_Occurred()) | |||
| 7719 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dgemv to C/Fortran array" ); | |||
| 7720 | } else { | |||
| 7721 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 7722 | ||||
| 7723 | /* Processing variable offx */ | |||
| 7724 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 7725 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dgemv() 3rd keyword (offx) can't be converted to int"); | |||
| 7726 | if (f2py_success) { | |||
| 7727 | /* Processing variable offy */ | |||
| 7728 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 7729 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dgemv() 5th keyword (offy) can't be converted to int"); | |||
| 7730 | if (f2py_success) { | |||
| 7731 | /* Processing variable m */ | |||
| 7732 | m = shape(a,0)a_Dims[0]; | |||
| 7733 | /* Processing variable n */ | |||
| 7734 | n = shape(a,1)a_Dims[1]; | |||
| 7735 | /* Processing variable rows */ | |||
| 7736 | rows = (trans?n:m); | |||
| 7737 | /* Processing variable cols */ | |||
| 7738 | cols = (trans?m:n); | |||
| 7739 | /* Processing variable x */ | |||
| 7740 | ; | |||
| 7741 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 7742 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 7743 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 7744 | if (!PyErr_Occurred()) | |||
| 7745 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dgemv to C/Fortran array" ); | |||
| 7746 | } else { | |||
| 7747 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 7748 | ||||
| 7749 | CHECKARRAY(len(x)>offx+(cols-1)*abs(incx),"len(x)>offx+(cols-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(cols-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(cols-1)*abs(incx)"") failed for " "3rd argument x"); } else { | |||
| 7750 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 7751 | /* Processing variable ly */ | |||
| 7752 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(rows-1)*abs(incy):-1); | |||
| 7753 | /* Processing variable y */ | |||
| 7754 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 7755 | y_Dims[0]=ly; | |||
| 7756 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 7757 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 7758 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 7759 | if (!PyErr_Occurred()) | |||
| 7760 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.dgemv to C/Fortran array" ); | |||
| 7761 | } else { | |||
| 7762 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 7763 | ||||
| 7764 | CHECKARRAY(len(y)>offy+(rows-1)*abs(incy),"len(y)>offy+(rows-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(rows-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(rows-1)*abs(incy)"") failed for " "2nd keyword y"); } else { | |||
| 7765 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 7766 | /*end of frompyobj*/ | |||
| 7767 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7768 | f2py_start_call_clock(); | |||
| 7769 | #endif | |||
| 7770 | /*callfortranroutine*/ | |||
| 7771 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&alpha,a,&m, x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 7772 | /*(*f2py_func)(&m,&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&trans,&rows,&cols,&ly);*/ | |||
| 7773 | if (PyErr_Occurred()) | |||
| 7774 | f2py_success = 0; | |||
| 7775 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7776 | f2py_stop_call_clock(); | |||
| 7777 | #endif | |||
| 7778 | /*end of callfortranroutine*/ | |||
| 7779 | if (f2py_success) { | |||
| 7780 | /*pyobjfrom*/ | |||
| 7781 | /*end of pyobjfrom*/ | |||
| 7782 | CFUNCSMESS("Building return value.\n"); | |||
| 7783 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 7784 | /*closepyobjfrom*/ | |||
| 7785 | /*end of closepyobjfrom*/ | |||
| 7786 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 7787 | /*cleanupfrompyobj*/ | |||
| 7788 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 7789 | } /*CHECKARRAY(len(y)>offy+(rows-1)*abs(incy))*/ | |||
| 7790 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 7791 | /* End of cleaning variable y */ | |||
| 7792 | /* End of cleaning variable ly */ | |||
| 7793 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 7794 | } /*CHECKARRAY(len(x)>offx+(cols-1)*abs(incx))*/ | |||
| 7795 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 7796 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 7797 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 7798 | /* End of cleaning variable x */ | |||
| 7799 | /* End of cleaning variable cols */ | |||
| 7800 | /* End of cleaning variable rows */ | |||
| 7801 | /* End of cleaning variable n */ | |||
| 7802 | /* End of cleaning variable m */ | |||
| 7803 | } /*if (f2py_success) of offy*/ | |||
| 7804 | /* End of cleaning variable offy */ | |||
| 7805 | } /*if (f2py_success) of offx*/ | |||
| 7806 | /* End of cleaning variable offx */ | |||
| 7807 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 7808 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 7809 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 7810 | /* End of cleaning variable a */ | |||
| 7811 | } /*if (f2py_success) of beta*/ | |||
| 7812 | /* End of cleaning variable beta */ | |||
| 7813 | } /*if (f2py_success) of alpha*/ | |||
| 7814 | /* End of cleaning variable alpha */ | |||
| 7815 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 7816 | } /*if (f2py_success) of incy*/ | |||
| 7817 | /* End of cleaning variable incy */ | |||
| 7818 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 7819 | } /*if (f2py_success) of incx*/ | |||
| 7820 | /* End of cleaning variable incx */ | |||
| 7821 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 7822 | } /*if (f2py_success) of trans*/ | |||
| 7823 | /* End of cleaning variable trans */ | |||
| 7824 | /*end of cleanupfrompyobj*/ | |||
| 7825 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 7826 | /*routdebugfailure*/ | |||
| 7827 | } else { | |||
| 7828 | /*routdebugleave*/ | |||
| 7829 | } | |||
| 7830 | CFUNCSMESS("Freeing memory.\n"); | |||
| 7831 | /*freemem*/ | |||
| 7832 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7833 | f2py_stop_clock(); | |||
| 7834 | #endif | |||
| 7835 | return capi_buildvalue; | |||
| 7836 | } | |||
| 7837 | /******************************** end of dgemv ********************************/ | |||
| 7838 | ||||
| 7839 | /*********************************** cgemv ***********************************/ | |||
| 7840 | static char doc_f2py_rout__fblas_cgemv[] = "\ | |||
| 7841 | y = cgemv(alpha,a,x,[beta,y,offx,incx,offy,incy,trans,overwrite_y])\n\nWrapper for ``cgemv``.\ | |||
| 7842 | \n\nParameters\n----------\n" | |||
| 7843 | "alpha : input complex\n" | |||
| 7844 | "a : input rank-2 array('F') with bounds (m,n)\n" | |||
| 7845 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 7846 | "\nOther Parameters\n----------------\n" | |||
| 7847 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 7848 | "y : input rank-1 array('F') with bounds (ly)\n" | |||
| 7849 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 7850 | "offx : input int, optional\n Default: 0\n" | |||
| 7851 | "incx : input int, optional\n Default: 1\n" | |||
| 7852 | "offy : input int, optional\n Default: 0\n" | |||
| 7853 | "incy : input int, optional\n Default: 1\n" | |||
| 7854 | "trans : input int, optional\n Default: 0\n" | |||
| 7855 | "\nReturns\n-------\n" | |||
| 7856 | "y : rank-1 array('F') with bounds (ly)"; | |||
| 7857 | /* extern void F_FUNC(cgemv,CGEMV)(char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*, complex_float*,F_INT* ); */ | |||
| 7858 | static PyObject *f2py_rout__fblas_cgemv(const PyObject *capi_self, | |||
| 7859 | PyObject *capi_args, | |||
| 7860 | PyObject *capi_keywds, | |||
| 7861 | void (*f2py_func)(char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* )) { | |||
| 7862 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 7863 | volatile int f2py_success = 1; | |||
| 7864 | /*decl*/ | |||
| 7865 | ||||
| 7866 | int m = 0; | |||
| 7867 | int n = 0; | |||
| 7868 | complex_float alpha; | |||
| 7869 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 7870 | complex_float *a = NULL((void*)0); | |||
| 7871 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 7872 | const int a_Rank = 2; | |||
| 7873 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 7874 | int capi_a_intent = 0; | |||
| 7875 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 7876 | complex_float *x = NULL((void*)0); | |||
| 7877 | npy_intp x_Dims[1] = {-1}; | |||
| 7878 | const int x_Rank = 1; | |||
| 7879 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 7880 | int capi_x_intent = 0; | |||
| 7881 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 7882 | complex_float beta; | |||
| 7883 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 7884 | complex_float *y = NULL((void*)0); | |||
| 7885 | npy_intp y_Dims[1] = {-1}; | |||
| 7886 | const int y_Rank = 1; | |||
| 7887 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 7888 | int capi_y_intent = 0; | |||
| 7889 | int capi_overwrite_y = 0; | |||
| 7890 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 7891 | int offx = 0; | |||
| 7892 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 7893 | int incx = 0; | |||
| 7894 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 7895 | int offy = 0; | |||
| 7896 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 7897 | int incy = 0; | |||
| 7898 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 7899 | int trans = 0; | |||
| 7900 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 7901 | int rows = 0; | |||
| 7902 | int cols = 0; | |||
| 7903 | int ly = 0; | |||
| 7904 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","trans","overwrite_y",NULL((void*)0)}; | |||
| 7905 | ||||
| 7906 | /*routdebugenter*/ | |||
| 7907 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7908 | f2py_start_clock(); | |||
| 7909 | #endif | |||
| 7910 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 7911 | "OOO|OOOOOOOi:_fblas.cgemv",\ | |||
| 7912 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 7913 | return NULL((void*)0); | |||
| 7914 | /*frompyobj*/ | |||
| 7915 | /* Processing variable trans */ | |||
| 7916 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 7917 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.cgemv() 7th keyword (trans) can't be converted to int"); | |||
| 7918 | if (f2py_success) { | |||
| 7919 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","cgemv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cgemv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 7920 | /* Processing variable incx */ | |||
| 7921 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 7922 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cgemv() 4th keyword (incx) can't be converted to int"); | |||
| 7923 | if (f2py_success) { | |||
| 7924 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","cgemv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgemv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7925 | /* Processing variable incy */ | |||
| 7926 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 7927 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cgemv() 6th keyword (incy) can't be converted to int"); | |||
| 7928 | if (f2py_success) { | |||
| 7929 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","cgemv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgemv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 7930 | /* Processing variable alpha */ | |||
| 7931 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cgemv() 1st argument (alpha) can't be converted to complex_float"); | |||
| 7932 | if (f2py_success) { | |||
| 7933 | /* Processing variable beta */ | |||
| 7934 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 7935 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.cgemv() 1st keyword (beta) can't be converted to complex_float"); | |||
| 7936 | if (f2py_success) { | |||
| 7937 | /* Processing variable a */ | |||
| 7938 | ; | |||
| 7939 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 7940 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 7941 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 7942 | if (!PyErr_Occurred()) | |||
| 7943 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.cgemv to C/Fortran array" ); | |||
| 7944 | } else { | |||
| 7945 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 7946 | ||||
| 7947 | /* Processing variable offx */ | |||
| 7948 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 7949 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cgemv() 3rd keyword (offx) can't be converted to int"); | |||
| 7950 | if (f2py_success) { | |||
| 7951 | /* Processing variable offy */ | |||
| 7952 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 7953 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cgemv() 5th keyword (offy) can't be converted to int"); | |||
| 7954 | if (f2py_success) { | |||
| 7955 | /* Processing variable m */ | |||
| 7956 | m = shape(a,0)a_Dims[0]; | |||
| 7957 | /* Processing variable n */ | |||
| 7958 | n = shape(a,1)a_Dims[1]; | |||
| 7959 | /* Processing variable rows */ | |||
| 7960 | rows = (trans?n:m); | |||
| 7961 | /* Processing variable cols */ | |||
| 7962 | cols = (trans?m:n); | |||
| 7963 | /* Processing variable x */ | |||
| 7964 | ; | |||
| 7965 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 7966 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 7967 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 7968 | if (!PyErr_Occurred()) | |||
| 7969 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.cgemv to C/Fortran array" ); | |||
| 7970 | } else { | |||
| 7971 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 7972 | ||||
| 7973 | CHECKARRAY(len(x)>offx+(cols-1)*abs(incx),"len(x)>offx+(cols-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(cols-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(cols-1)*abs(incx)"") failed for " "3rd argument x"); } else { | |||
| 7974 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 7975 | /* Processing variable ly */ | |||
| 7976 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(rows-1)*abs(incy):-1); | |||
| 7977 | /* Processing variable y */ | |||
| 7978 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 7979 | y_Dims[0]=ly; | |||
| 7980 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 7981 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 7982 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 7983 | if (!PyErr_Occurred()) | |||
| 7984 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.cgemv to C/Fortran array" ); | |||
| 7985 | } else { | |||
| 7986 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 7987 | ||||
| 7988 | CHECKARRAY(len(y)>offy+(rows-1)*abs(incy),"len(y)>offy+(rows-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(rows-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(rows-1)*abs(incy)"") failed for " "2nd keyword y"); } else { | |||
| 7989 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 7990 | /*end of frompyobj*/ | |||
| 7991 | #ifdef F2PY_REPORT_ATEXIT | |||
| 7992 | f2py_start_call_clock(); | |||
| 7993 | #endif | |||
| 7994 | /*callfortranroutine*/ | |||
| 7995 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&alpha,a,&m, x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 7996 | /*(*f2py_func)(&m,&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&trans,&rows,&cols,&ly);*/ | |||
| 7997 | if (PyErr_Occurred()) | |||
| 7998 | f2py_success = 0; | |||
| 7999 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8000 | f2py_stop_call_clock(); | |||
| 8001 | #endif | |||
| 8002 | /*end of callfortranroutine*/ | |||
| 8003 | if (f2py_success) { | |||
| 8004 | /*pyobjfrom*/ | |||
| 8005 | /*end of pyobjfrom*/ | |||
| 8006 | CFUNCSMESS("Building return value.\n"); | |||
| 8007 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 8008 | /*closepyobjfrom*/ | |||
| 8009 | /*end of closepyobjfrom*/ | |||
| 8010 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 8011 | /*cleanupfrompyobj*/ | |||
| 8012 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 8013 | } /*CHECKARRAY(len(y)>offy+(rows-1)*abs(incy))*/ | |||
| 8014 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 8015 | /* End of cleaning variable y */ | |||
| 8016 | /* End of cleaning variable ly */ | |||
| 8017 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 8018 | } /*CHECKARRAY(len(x)>offx+(cols-1)*abs(incx))*/ | |||
| 8019 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 8020 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 8021 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 8022 | /* End of cleaning variable x */ | |||
| 8023 | /* End of cleaning variable cols */ | |||
| 8024 | /* End of cleaning variable rows */ | |||
| 8025 | /* End of cleaning variable n */ | |||
| 8026 | /* End of cleaning variable m */ | |||
| 8027 | } /*if (f2py_success) of offy*/ | |||
| 8028 | /* End of cleaning variable offy */ | |||
| 8029 | } /*if (f2py_success) of offx*/ | |||
| 8030 | /* End of cleaning variable offx */ | |||
| 8031 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 8032 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 8033 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 8034 | /* End of cleaning variable a */ | |||
| 8035 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 8036 | /* End of cleaning variable beta */ | |||
| 8037 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 8038 | /* End of cleaning variable alpha */ | |||
| 8039 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 8040 | } /*if (f2py_success) of incy*/ | |||
| 8041 | /* End of cleaning variable incy */ | |||
| 8042 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 8043 | } /*if (f2py_success) of incx*/ | |||
| 8044 | /* End of cleaning variable incx */ | |||
| 8045 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 8046 | } /*if (f2py_success) of trans*/ | |||
| 8047 | /* End of cleaning variable trans */ | |||
| 8048 | /*end of cleanupfrompyobj*/ | |||
| 8049 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 8050 | /*routdebugfailure*/ | |||
| 8051 | } else { | |||
| 8052 | /*routdebugleave*/ | |||
| 8053 | } | |||
| 8054 | CFUNCSMESS("Freeing memory.\n"); | |||
| 8055 | /*freemem*/ | |||
| 8056 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8057 | f2py_stop_clock(); | |||
| 8058 | #endif | |||
| 8059 | return capi_buildvalue; | |||
| 8060 | } | |||
| 8061 | /******************************** end of cgemv ********************************/ | |||
| 8062 | ||||
| 8063 | /*********************************** zgemv ***********************************/ | |||
| 8064 | static char doc_f2py_rout__fblas_zgemv[] = "\ | |||
| 8065 | y = zgemv(alpha,a,x,[beta,y,offx,incx,offy,incy,trans,overwrite_y])\n\nWrapper for ``zgemv``.\ | |||
| 8066 | \n\nParameters\n----------\n" | |||
| 8067 | "alpha : input complex\n" | |||
| 8068 | "a : input rank-2 array('D') with bounds (m,n)\n" | |||
| 8069 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 8070 | "\nOther Parameters\n----------------\n" | |||
| 8071 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 8072 | "y : input rank-1 array('D') with bounds (ly)\n" | |||
| 8073 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 8074 | "offx : input int, optional\n Default: 0\n" | |||
| 8075 | "incx : input int, optional\n Default: 1\n" | |||
| 8076 | "offy : input int, optional\n Default: 0\n" | |||
| 8077 | "incy : input int, optional\n Default: 1\n" | |||
| 8078 | "trans : input int, optional\n Default: 0\n" | |||
| 8079 | "\nReturns\n-------\n" | |||
| 8080 | "y : rank-1 array('D') with bounds (ly)"; | |||
| 8081 | /* extern void F_FUNC(zgemv,ZGEMV)(char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*, complex_double*,F_INT* ); */ | |||
| 8082 | static PyObject *f2py_rout__fblas_zgemv(const PyObject *capi_self, | |||
| 8083 | PyObject *capi_args, | |||
| 8084 | PyObject *capi_keywds, | |||
| 8085 | void (*f2py_func)(char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* )) { | |||
| 8086 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 8087 | volatile int f2py_success = 1; | |||
| 8088 | /*decl*/ | |||
| 8089 | ||||
| 8090 | int m = 0; | |||
| 8091 | int n = 0; | |||
| 8092 | complex_double alpha; | |||
| 8093 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 8094 | complex_double *a = NULL((void*)0); | |||
| 8095 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 8096 | const int a_Rank = 2; | |||
| 8097 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 8098 | int capi_a_intent = 0; | |||
| 8099 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 8100 | complex_double *x = NULL((void*)0); | |||
| 8101 | npy_intp x_Dims[1] = {-1}; | |||
| 8102 | const int x_Rank = 1; | |||
| 8103 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 8104 | int capi_x_intent = 0; | |||
| 8105 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 8106 | complex_double beta; | |||
| 8107 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 8108 | complex_double *y = NULL((void*)0); | |||
| 8109 | npy_intp y_Dims[1] = {-1}; | |||
| 8110 | const int y_Rank = 1; | |||
| 8111 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 8112 | int capi_y_intent = 0; | |||
| 8113 | int capi_overwrite_y = 0; | |||
| 8114 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 8115 | int offx = 0; | |||
| 8116 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 8117 | int incx = 0; | |||
| 8118 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 8119 | int offy = 0; | |||
| 8120 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 8121 | int incy = 0; | |||
| 8122 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 8123 | int trans = 0; | |||
| 8124 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 8125 | int rows = 0; | |||
| 8126 | int cols = 0; | |||
| 8127 | int ly = 0; | |||
| 8128 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","trans","overwrite_y",NULL((void*)0)}; | |||
| 8129 | ||||
| 8130 | /*routdebugenter*/ | |||
| 8131 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8132 | f2py_start_clock(); | |||
| 8133 | #endif | |||
| 8134 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 8135 | "OOO|OOOOOOOi:_fblas.zgemv",\ | |||
| 8136 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 8137 | return NULL((void*)0); | |||
| 8138 | /*frompyobj*/ | |||
| 8139 | /* Processing variable trans */ | |||
| 8140 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 8141 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.zgemv() 7th keyword (trans) can't be converted to int"); | |||
| 8142 | if (f2py_success) { | |||
| 8143 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","zgemv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zgemv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 8144 | /* Processing variable incx */ | |||
| 8145 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 8146 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zgemv() 4th keyword (incx) can't be converted to int"); | |||
| 8147 | if (f2py_success) { | |||
| 8148 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","zgemv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgemv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8149 | /* Processing variable incy */ | |||
| 8150 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 8151 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zgemv() 6th keyword (incy) can't be converted to int"); | |||
| 8152 | if (f2py_success) { | |||
| 8153 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","zgemv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgemv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8154 | /* Processing variable alpha */ | |||
| 8155 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zgemv() 1st argument (alpha) can't be converted to complex_double"); | |||
| 8156 | if (f2py_success) { | |||
| 8157 | /* Processing variable beta */ | |||
| 8158 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 8159 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zgemv() 1st keyword (beta) can't be converted to complex_double"); | |||
| 8160 | if (f2py_success) { | |||
| 8161 | /* Processing variable a */ | |||
| 8162 | ; | |||
| 8163 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 8164 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 8165 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 8166 | if (!PyErr_Occurred()) | |||
| 8167 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zgemv to C/Fortran array" ); | |||
| 8168 | } else { | |||
| 8169 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 8170 | ||||
| 8171 | /* Processing variable offx */ | |||
| 8172 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 8173 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zgemv() 3rd keyword (offx) can't be converted to int"); | |||
| 8174 | if (f2py_success) { | |||
| 8175 | /* Processing variable offy */ | |||
| 8176 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 8177 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zgemv() 5th keyword (offy) can't be converted to int"); | |||
| 8178 | if (f2py_success) { | |||
| 8179 | /* Processing variable m */ | |||
| 8180 | m = shape(a,0)a_Dims[0]; | |||
| 8181 | /* Processing variable n */ | |||
| 8182 | n = shape(a,1)a_Dims[1]; | |||
| 8183 | /* Processing variable rows */ | |||
| 8184 | rows = (trans?n:m); | |||
| 8185 | /* Processing variable cols */ | |||
| 8186 | cols = (trans?m:n); | |||
| 8187 | /* Processing variable x */ | |||
| 8188 | ; | |||
| 8189 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 8190 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 8191 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 8192 | if (!PyErr_Occurred()) | |||
| 8193 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.zgemv to C/Fortran array" ); | |||
| 8194 | } else { | |||
| 8195 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 8196 | ||||
| 8197 | CHECKARRAY(len(x)>offx+(cols-1)*abs(incx),"len(x)>offx+(cols-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(cols-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(cols-1)*abs(incx)"") failed for " "3rd argument x"); } else { | |||
| 8198 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 8199 | /* Processing variable ly */ | |||
| 8200 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(rows-1)*abs(incy):-1); | |||
| 8201 | /* Processing variable y */ | |||
| 8202 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 8203 | y_Dims[0]=ly; | |||
| 8204 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 8205 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 8206 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 8207 | if (!PyErr_Occurred()) | |||
| 8208 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.zgemv to C/Fortran array" ); | |||
| 8209 | } else { | |||
| 8210 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 8211 | ||||
| 8212 | CHECKARRAY(len(y)>offy+(rows-1)*abs(incy),"len(y)>offy+(rows-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(rows-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(rows-1)*abs(incy)"") failed for " "2nd keyword y"); } else { | |||
| 8213 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 8214 | /*end of frompyobj*/ | |||
| 8215 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8216 | f2py_start_call_clock(); | |||
| 8217 | #endif | |||
| 8218 | /*callfortranroutine*/ | |||
| 8219 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&alpha,a,&m, x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 8220 | /*(*f2py_func)(&m,&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&trans,&rows,&cols,&ly);*/ | |||
| 8221 | if (PyErr_Occurred()) | |||
| 8222 | f2py_success = 0; | |||
| 8223 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8224 | f2py_stop_call_clock(); | |||
| 8225 | #endif | |||
| 8226 | /*end of callfortranroutine*/ | |||
| 8227 | if (f2py_success) { | |||
| 8228 | /*pyobjfrom*/ | |||
| 8229 | /*end of pyobjfrom*/ | |||
| 8230 | CFUNCSMESS("Building return value.\n"); | |||
| 8231 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 8232 | /*closepyobjfrom*/ | |||
| 8233 | /*end of closepyobjfrom*/ | |||
| 8234 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 8235 | /*cleanupfrompyobj*/ | |||
| 8236 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 8237 | } /*CHECKARRAY(len(y)>offy+(rows-1)*abs(incy))*/ | |||
| 8238 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 8239 | /* End of cleaning variable y */ | |||
| 8240 | /* End of cleaning variable ly */ | |||
| 8241 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 8242 | } /*CHECKARRAY(len(x)>offx+(cols-1)*abs(incx))*/ | |||
| 8243 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 8244 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 8245 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 8246 | /* End of cleaning variable x */ | |||
| 8247 | /* End of cleaning variable cols */ | |||
| 8248 | /* End of cleaning variable rows */ | |||
| 8249 | /* End of cleaning variable n */ | |||
| 8250 | /* End of cleaning variable m */ | |||
| 8251 | } /*if (f2py_success) of offy*/ | |||
| 8252 | /* End of cleaning variable offy */ | |||
| 8253 | } /*if (f2py_success) of offx*/ | |||
| 8254 | /* End of cleaning variable offx */ | |||
| 8255 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 8256 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 8257 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 8258 | /* End of cleaning variable a */ | |||
| 8259 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 8260 | /* End of cleaning variable beta */ | |||
| 8261 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 8262 | /* End of cleaning variable alpha */ | |||
| 8263 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 8264 | } /*if (f2py_success) of incy*/ | |||
| 8265 | /* End of cleaning variable incy */ | |||
| 8266 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 8267 | } /*if (f2py_success) of incx*/ | |||
| 8268 | /* End of cleaning variable incx */ | |||
| 8269 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 8270 | } /*if (f2py_success) of trans*/ | |||
| 8271 | /* End of cleaning variable trans */ | |||
| 8272 | /*end of cleanupfrompyobj*/ | |||
| 8273 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 8274 | /*routdebugfailure*/ | |||
| 8275 | } else { | |||
| 8276 | /*routdebugleave*/ | |||
| 8277 | } | |||
| 8278 | CFUNCSMESS("Freeing memory.\n"); | |||
| 8279 | /*freemem*/ | |||
| 8280 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8281 | f2py_stop_clock(); | |||
| 8282 | #endif | |||
| 8283 | return capi_buildvalue; | |||
| 8284 | } | |||
| 8285 | /******************************** end of zgemv ********************************/ | |||
| 8286 | ||||
| 8287 | /*********************************** sgbmv ***********************************/ | |||
| 8288 | static char doc_f2py_rout__fblas_sgbmv[] = "\ | |||
| 8289 | yout = sgbmv(m,n,kl,ku,alpha,a,x,[incx,offx,beta,y,incy,offy,trans,overwrite_y])\n\nWrapper for ``sgbmv``.\ | |||
| 8290 | \n\nParameters\n----------\n" | |||
| 8291 | "m : input int\n" | |||
| 8292 | "n : input int\n" | |||
| 8293 | "kl : input int\n" | |||
| 8294 | "ku : input int\n" | |||
| 8295 | "alpha : input float\n" | |||
| 8296 | "a : input rank-2 array('f') with bounds (lda,n)\n" | |||
| 8297 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 8298 | "\nOther Parameters\n----------------\n" | |||
| 8299 | "incx : input int, optional\n Default: 1\n" | |||
| 8300 | "offx : input int, optional\n Default: 0\n" | |||
| 8301 | "beta : input float, optional\n Default: 0.0\n" | |||
| 8302 | "y : input rank-1 array('f') with bounds (ly)\n" | |||
| 8303 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 8304 | "incy : input int, optional\n Default: 1\n" | |||
| 8305 | "offy : input int, optional\n Default: 0\n" | |||
| 8306 | "trans : input int, optional\n Default: 0\n" | |||
| 8307 | "\nReturns\n-------\n" | |||
| 8308 | "yout : rank-1 array('f') with bounds (ly) and y storage"; | |||
| 8309 | /* extern void F_FUNC(sgbmv,SGBMV)(char*,F_INT*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT* ); */ | |||
| 8310 | static PyObject *f2py_rout__fblas_sgbmv(const PyObject *capi_self, | |||
| 8311 | PyObject *capi_args, | |||
| 8312 | PyObject *capi_keywds, | |||
| 8313 | void (*f2py_func)(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*,float*,F_INTint* )) { | |||
| 8314 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 8315 | volatile int f2py_success = 1; | |||
| 8316 | /*decl*/ | |||
| 8317 | ||||
| 8318 | int m = 0; | |||
| 8319 | PyObject *m_capi = Py_None(&_Py_NoneStruct); | |||
| 8320 | int n = 0; | |||
| 8321 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 8322 | int kl = 0; | |||
| 8323 | PyObject *kl_capi = Py_None(&_Py_NoneStruct); | |||
| 8324 | int ku = 0; | |||
| 8325 | PyObject *ku_capi = Py_None(&_Py_NoneStruct); | |||
| 8326 | float alpha = 0; | |||
| 8327 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 8328 | float *a = NULL((void*)0); | |||
| 8329 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 8330 | const int a_Rank = 2; | |||
| 8331 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 8332 | int capi_a_intent = 0; | |||
| 8333 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 8334 | int lda = 0; | |||
| 8335 | float *x = NULL((void*)0); | |||
| 8336 | npy_intp x_Dims[1] = {-1}; | |||
| 8337 | const int x_Rank = 1; | |||
| 8338 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 8339 | int capi_x_intent = 0; | |||
| 8340 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 8341 | int incx = 0; | |||
| 8342 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 8343 | int offx = 0; | |||
| 8344 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 8345 | float beta = 0; | |||
| 8346 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 8347 | float *y = NULL((void*)0); | |||
| 8348 | npy_intp y_Dims[1] = {-1}; | |||
| 8349 | const int y_Rank = 1; | |||
| 8350 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 8351 | int capi_y_intent = 0; | |||
| 8352 | int capi_overwrite_y = 0; | |||
| 8353 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 8354 | int incy = 0; | |||
| 8355 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 8356 | int offy = 0; | |||
| 8357 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 8358 | int trans = 0; | |||
| 8359 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 8360 | int ly = 0; | |||
| 8361 | static char *capi_kwlist[] = {"m","n","kl","ku","alpha","a","x","incx","offx","beta","y","incy","offy","trans","overwrite_y",NULL((void*)0)}; | |||
| 8362 | ||||
| 8363 | /*routdebugenter*/ | |||
| 8364 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8365 | f2py_start_clock(); | |||
| 8366 | #endif | |||
| 8367 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 8368 | "OOOOOOO|OOOOOOOi:_fblas.sgbmv",\ | |||
| 8369 | capi_kwlist,&m_capi,&n_capi,&kl_capi,&ku_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 8370 | return NULL((void*)0); | |||
| 8371 | /*frompyobj*/ | |||
| 8372 | /* Processing variable trans */ | |||
| 8373 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 8374 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.sgbmv() 7th keyword (trans) can't be converted to int"); | |||
| 8375 | if (f2py_success) { | |||
| 8376 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","sgbmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sgbmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 8377 | /* Processing variable kl */ | |||
| 8378 | f2py_success = int_from_pyobj(&kl,kl_capi,"_fblas.sgbmv() 3rd argument (kl) can't be converted to int"); | |||
| 8379 | if (f2py_success) { | |||
| 8380 | CHECKSCALAR(kl>=0,"kl>=0","3rd argument kl","sgbmv:kl=%d",kl)if (!(kl>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgbmv:kl=%d", "(""kl>=0"") failed for ""3rd argument kl" , kl); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8381 | /* Processing variable ku */ | |||
| 8382 | f2py_success = int_from_pyobj(&ku,ku_capi,"_fblas.sgbmv() 4th argument (ku) can't be converted to int"); | |||
| 8383 | if (f2py_success) { | |||
| 8384 | CHECKSCALAR(ku>=0,"ku>=0","4th argument ku","sgbmv:ku=%d",ku)if (!(ku>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgbmv:ku=%d", "(""ku>=0"") failed for ""4th argument ku" , ku); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8385 | /* Processing variable incx */ | |||
| 8386 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 8387 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sgbmv() 1st keyword (incx) can't be converted to int"); | |||
| 8388 | if (f2py_success) { | |||
| 8389 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","sgbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8390 | /* Processing variable incy */ | |||
| 8391 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 8392 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sgbmv() 5th keyword (incy) can't be converted to int"); | |||
| 8393 | if (f2py_success) { | |||
| 8394 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","sgbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8395 | /* Processing variable offx */ | |||
| 8396 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 8397 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sgbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 8398 | if (f2py_success) { | |||
| 8399 | /* Processing variable offy */ | |||
| 8400 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 8401 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.sgbmv() 6th keyword (offy) can't be converted to int"); | |||
| 8402 | if (f2py_success) { | |||
| 8403 | /* Processing variable alpha */ | |||
| 8404 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sgbmv() 5th argument (alpha) can't be converted to float"); | |||
| 8405 | if (f2py_success) { | |||
| 8406 | /* Processing variable beta */ | |||
| 8407 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 8408 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.sgbmv() 3rd keyword (beta) can't be converted to float"); | |||
| 8409 | if (f2py_success) { | |||
| 8410 | /* Processing variable a */ | |||
| 8411 | ; | |||
| 8412 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 8413 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 8414 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 8415 | if (!PyErr_Occurred()) | |||
| 8416 | PyErr_SetString(_fblas_error,"failed in converting 6th argument `a' of _fblas.sgbmv to C/Fortran array" ); | |||
| 8417 | } else { | |||
| 8418 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 8419 | ||||
| 8420 | /* Processing variable m */ | |||
| 8421 | f2py_success = int_from_pyobj(&m,m_capi,"_fblas.sgbmv() 1st argument (m) can't be converted to int"); | |||
| 8422 | if (f2py_success) { | |||
| 8423 | CHECKSCALAR(m>=ku+kl+1,"m>=ku+kl+1","1st argument m","sgbmv:m=%d",m)if (!(m>=ku+kl+1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgbmv:m=%d", "(""m>=ku+kl+1"") failed for ""1st argument m" , m); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8424 | /* Processing variable n */ | |||
| 8425 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sgbmv() 2nd argument (n) can't be converted to int"); | |||
| 8426 | if (f2py_success) { | |||
| 8427 | CHECKSCALAR(n>=0&&n==shape(a,1),"n>=0&&n==shape(a,1)","2nd argument n","sgbmv:n=%d",n)if (!(n>=0&&n==a_Dims[1])) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgbmv:n=%d", "(""n>=0&&n==shape(a,1)"") failed for " "2nd argument n", n); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 8428 | /* Processing variable lda */ | |||
| 8429 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 8430 | /* Processing variable ly */ | |||
| 8431 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(trans==0?m-1:n-1)*abs(incy):-1); | |||
| 8432 | /* Processing variable y */ | |||
| 8433 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 8434 | y_Dims[0]=ly; | |||
| 8435 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 8436 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 8437 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 8438 | if (!PyErr_Occurred()) | |||
| 8439 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.sgbmv to C/Fortran array" ); | |||
| 8440 | } else { | |||
| 8441 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 8442 | ||||
| 8443 | CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy),"len(y)>offy+(trans==0?m-1:n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(trans==0?m-1:n-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(trans==0?m-1:n-1)*abs(incy)" ") failed for ""4th keyword y"); } else { | |||
| 8444 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 8445 | /* Processing variable x */ | |||
| 8446 | ; | |||
| 8447 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 8448 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 8449 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 8450 | if (!PyErr_Occurred()) | |||
| 8451 | PyErr_SetString(_fblas_error,"failed in converting 7th argument `x' of _fblas.sgbmv to C/Fortran array" ); | |||
| 8452 | } else { | |||
| 8453 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 8454 | ||||
| 8455 | CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx),"len(x)>offx+(trans==0?m-1:n-1)*abs(incx)","7th argument x")if (!(x_Dims[0]>offx+(trans==0?m-1:n-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(trans==0?m-1:n-1)*abs(incx)" ") failed for ""7th argument x"); } else { | |||
| 8456 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","7th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "7th argument x"); } else { | |||
| 8457 | /*end of frompyobj*/ | |||
| 8458 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8459 | f2py_start_call_clock(); | |||
| 8460 | #endif | |||
| 8461 | /*callfortranroutine*/ | |||
| 8462 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&kl,&ku,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 8463 | /*(*f2py_func)(&m,&n,&kl,&ku,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&trans,&ly);*/ | |||
| 8464 | if (PyErr_Occurred()) | |||
| 8465 | f2py_success = 0; | |||
| 8466 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8467 | f2py_stop_call_clock(); | |||
| 8468 | #endif | |||
| 8469 | /*end of callfortranroutine*/ | |||
| 8470 | if (f2py_success) { | |||
| 8471 | /*pyobjfrom*/ | |||
| 8472 | /*end of pyobjfrom*/ | |||
| 8473 | CFUNCSMESS("Building return value.\n"); | |||
| 8474 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 8475 | /*closepyobjfrom*/ | |||
| 8476 | /*end of closepyobjfrom*/ | |||
| 8477 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 8478 | /*cleanupfrompyobj*/ | |||
| 8479 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 8480 | } /*CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx))*/ | |||
| 8481 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 8482 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 8483 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 8484 | /* End of cleaning variable x */ | |||
| 8485 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 8486 | } /*CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy))*/ | |||
| 8487 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 8488 | /* End of cleaning variable y */ | |||
| 8489 | /* End of cleaning variable ly */ | |||
| 8490 | /* End of cleaning variable lda */ | |||
| 8491 | } /*CHECKSCALAR(n>=0&&n==shape(a,1))*/ | |||
| 8492 | } /*if (f2py_success) of n*/ | |||
| 8493 | /* End of cleaning variable n */ | |||
| 8494 | } /*CHECKSCALAR(m>=ku+kl+1)*/ | |||
| 8495 | } /*if (f2py_success) of m*/ | |||
| 8496 | /* End of cleaning variable m */ | |||
| 8497 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 8498 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 8499 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 8500 | /* End of cleaning variable a */ | |||
| 8501 | } /*if (f2py_success) of beta*/ | |||
| 8502 | /* End of cleaning variable beta */ | |||
| 8503 | } /*if (f2py_success) of alpha*/ | |||
| 8504 | /* End of cleaning variable alpha */ | |||
| 8505 | } /*if (f2py_success) of offy*/ | |||
| 8506 | /* End of cleaning variable offy */ | |||
| 8507 | } /*if (f2py_success) of offx*/ | |||
| 8508 | /* End of cleaning variable offx */ | |||
| 8509 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 8510 | } /*if (f2py_success) of incy*/ | |||
| 8511 | /* End of cleaning variable incy */ | |||
| 8512 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 8513 | } /*if (f2py_success) of incx*/ | |||
| 8514 | /* End of cleaning variable incx */ | |||
| 8515 | } /*CHECKSCALAR(ku>=0)*/ | |||
| 8516 | } /*if (f2py_success) of ku*/ | |||
| 8517 | /* End of cleaning variable ku */ | |||
| 8518 | } /*CHECKSCALAR(kl>=0)*/ | |||
| 8519 | } /*if (f2py_success) of kl*/ | |||
| 8520 | /* End of cleaning variable kl */ | |||
| 8521 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 8522 | } /*if (f2py_success) of trans*/ | |||
| 8523 | /* End of cleaning variable trans */ | |||
| 8524 | /*end of cleanupfrompyobj*/ | |||
| 8525 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 8526 | /*routdebugfailure*/ | |||
| 8527 | } else { | |||
| 8528 | /*routdebugleave*/ | |||
| 8529 | } | |||
| 8530 | CFUNCSMESS("Freeing memory.\n"); | |||
| 8531 | /*freemem*/ | |||
| 8532 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8533 | f2py_stop_clock(); | |||
| 8534 | #endif | |||
| 8535 | return capi_buildvalue; | |||
| 8536 | } | |||
| 8537 | /******************************** end of sgbmv ********************************/ | |||
| 8538 | ||||
| 8539 | /*********************************** dgbmv ***********************************/ | |||
| 8540 | static char doc_f2py_rout__fblas_dgbmv[] = "\ | |||
| 8541 | yout = dgbmv(m,n,kl,ku,alpha,a,x,[incx,offx,beta,y,incy,offy,trans,overwrite_y])\n\nWrapper for ``dgbmv``.\ | |||
| 8542 | \n\nParameters\n----------\n" | |||
| 8543 | "m : input int\n" | |||
| 8544 | "n : input int\n" | |||
| 8545 | "kl : input int\n" | |||
| 8546 | "ku : input int\n" | |||
| 8547 | "alpha : input float\n" | |||
| 8548 | "a : input rank-2 array('d') with bounds (lda,n)\n" | |||
| 8549 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 8550 | "\nOther Parameters\n----------------\n" | |||
| 8551 | "incx : input int, optional\n Default: 1\n" | |||
| 8552 | "offx : input int, optional\n Default: 0\n" | |||
| 8553 | "beta : input float, optional\n Default: 0.0\n" | |||
| 8554 | "y : input rank-1 array('d') with bounds (ly)\n" | |||
| 8555 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 8556 | "incy : input int, optional\n Default: 1\n" | |||
| 8557 | "offy : input int, optional\n Default: 0\n" | |||
| 8558 | "trans : input int, optional\n Default: 0\n" | |||
| 8559 | "\nReturns\n-------\n" | |||
| 8560 | "yout : rank-1 array('d') with bounds (ly) and y storage"; | |||
| 8561 | /* extern void F_FUNC(dgbmv,DGBMV)(char*,F_INT*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT* ); */ | |||
| 8562 | static PyObject *f2py_rout__fblas_dgbmv(const PyObject *capi_self, | |||
| 8563 | PyObject *capi_args, | |||
| 8564 | PyObject *capi_keywds, | |||
| 8565 | void (*f2py_func)(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*,double*,F_INTint* )) { | |||
| 8566 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 8567 | volatile int f2py_success = 1; | |||
| 8568 | /*decl*/ | |||
| 8569 | ||||
| 8570 | int m = 0; | |||
| 8571 | PyObject *m_capi = Py_None(&_Py_NoneStruct); | |||
| 8572 | int n = 0; | |||
| 8573 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 8574 | int kl = 0; | |||
| 8575 | PyObject *kl_capi = Py_None(&_Py_NoneStruct); | |||
| 8576 | int ku = 0; | |||
| 8577 | PyObject *ku_capi = Py_None(&_Py_NoneStruct); | |||
| 8578 | double alpha = 0; | |||
| 8579 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 8580 | double *a = NULL((void*)0); | |||
| 8581 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 8582 | const int a_Rank = 2; | |||
| 8583 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 8584 | int capi_a_intent = 0; | |||
| 8585 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 8586 | int lda = 0; | |||
| 8587 | double *x = NULL((void*)0); | |||
| 8588 | npy_intp x_Dims[1] = {-1}; | |||
| 8589 | const int x_Rank = 1; | |||
| 8590 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 8591 | int capi_x_intent = 0; | |||
| 8592 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 8593 | int incx = 0; | |||
| 8594 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 8595 | int offx = 0; | |||
| 8596 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 8597 | double beta = 0; | |||
| 8598 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 8599 | double *y = NULL((void*)0); | |||
| 8600 | npy_intp y_Dims[1] = {-1}; | |||
| 8601 | const int y_Rank = 1; | |||
| 8602 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 8603 | int capi_y_intent = 0; | |||
| 8604 | int capi_overwrite_y = 0; | |||
| 8605 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 8606 | int incy = 0; | |||
| 8607 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 8608 | int offy = 0; | |||
| 8609 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 8610 | int trans = 0; | |||
| 8611 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 8612 | int ly = 0; | |||
| 8613 | static char *capi_kwlist[] = {"m","n","kl","ku","alpha","a","x","incx","offx","beta","y","incy","offy","trans","overwrite_y",NULL((void*)0)}; | |||
| 8614 | ||||
| 8615 | /*routdebugenter*/ | |||
| 8616 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8617 | f2py_start_clock(); | |||
| 8618 | #endif | |||
| 8619 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 8620 | "OOOOOOO|OOOOOOOi:_fblas.dgbmv",\ | |||
| 8621 | capi_kwlist,&m_capi,&n_capi,&kl_capi,&ku_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 8622 | return NULL((void*)0); | |||
| 8623 | /*frompyobj*/ | |||
| 8624 | /* Processing variable trans */ | |||
| 8625 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 8626 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dgbmv() 7th keyword (trans) can't be converted to int"); | |||
| 8627 | if (f2py_success) { | |||
| 8628 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","dgbmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dgbmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 8629 | /* Processing variable kl */ | |||
| 8630 | f2py_success = int_from_pyobj(&kl,kl_capi,"_fblas.dgbmv() 3rd argument (kl) can't be converted to int"); | |||
| 8631 | if (f2py_success) { | |||
| 8632 | CHECKSCALAR(kl>=0,"kl>=0","3rd argument kl","dgbmv:kl=%d",kl)if (!(kl>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgbmv:kl=%d", "(""kl>=0"") failed for ""3rd argument kl" , kl); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8633 | /* Processing variable ku */ | |||
| 8634 | f2py_success = int_from_pyobj(&ku,ku_capi,"_fblas.dgbmv() 4th argument (ku) can't be converted to int"); | |||
| 8635 | if (f2py_success) { | |||
| 8636 | CHECKSCALAR(ku>=0,"ku>=0","4th argument ku","dgbmv:ku=%d",ku)if (!(ku>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgbmv:ku=%d", "(""ku>=0"") failed for ""4th argument ku" , ku); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8637 | /* Processing variable incx */ | |||
| 8638 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 8639 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dgbmv() 1st keyword (incx) can't be converted to int"); | |||
| 8640 | if (f2py_success) { | |||
| 8641 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dgbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8642 | /* Processing variable incy */ | |||
| 8643 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 8644 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dgbmv() 5th keyword (incy) can't be converted to int"); | |||
| 8645 | if (f2py_success) { | |||
| 8646 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","dgbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8647 | /* Processing variable offx */ | |||
| 8648 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 8649 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dgbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 8650 | if (f2py_success) { | |||
| 8651 | /* Processing variable offy */ | |||
| 8652 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 8653 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dgbmv() 6th keyword (offy) can't be converted to int"); | |||
| 8654 | if (f2py_success) { | |||
| 8655 | /* Processing variable alpha */ | |||
| 8656 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dgbmv() 5th argument (alpha) can't be converted to double"); | |||
| 8657 | if (f2py_success) { | |||
| 8658 | /* Processing variable beta */ | |||
| 8659 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 8660 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dgbmv() 3rd keyword (beta) can't be converted to double"); | |||
| 8661 | if (f2py_success) { | |||
| 8662 | /* Processing variable a */ | |||
| 8663 | ; | |||
| 8664 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 8665 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 8666 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 8667 | if (!PyErr_Occurred()) | |||
| 8668 | PyErr_SetString(_fblas_error,"failed in converting 6th argument `a' of _fblas.dgbmv to C/Fortran array" ); | |||
| 8669 | } else { | |||
| 8670 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 8671 | ||||
| 8672 | /* Processing variable m */ | |||
| 8673 | f2py_success = int_from_pyobj(&m,m_capi,"_fblas.dgbmv() 1st argument (m) can't be converted to int"); | |||
| 8674 | if (f2py_success) { | |||
| 8675 | CHECKSCALAR(m>=ku+kl+1,"m>=ku+kl+1","1st argument m","dgbmv:m=%d",m)if (!(m>=ku+kl+1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgbmv:m=%d", "(""m>=ku+kl+1"") failed for ""1st argument m" , m); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8676 | /* Processing variable n */ | |||
| 8677 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dgbmv() 2nd argument (n) can't be converted to int"); | |||
| 8678 | if (f2py_success) { | |||
| 8679 | CHECKSCALAR(n>=0&&n==shape(a,1),"n>=0&&n==shape(a,1)","2nd argument n","dgbmv:n=%d",n)if (!(n>=0&&n==a_Dims[1])) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgbmv:n=%d", "(""n>=0&&n==shape(a,1)"") failed for " "2nd argument n", n); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 8680 | /* Processing variable lda */ | |||
| 8681 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 8682 | /* Processing variable ly */ | |||
| 8683 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(trans==0?m-1:n-1)*abs(incy):-1); | |||
| 8684 | /* Processing variable y */ | |||
| 8685 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 8686 | y_Dims[0]=ly; | |||
| 8687 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 8688 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 8689 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 8690 | if (!PyErr_Occurred()) | |||
| 8691 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.dgbmv to C/Fortran array" ); | |||
| 8692 | } else { | |||
| 8693 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 8694 | ||||
| 8695 | CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy),"len(y)>offy+(trans==0?m-1:n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(trans==0?m-1:n-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(trans==0?m-1:n-1)*abs(incy)" ") failed for ""4th keyword y"); } else { | |||
| 8696 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 8697 | /* Processing variable x */ | |||
| 8698 | ; | |||
| 8699 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 8700 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 8701 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 8702 | if (!PyErr_Occurred()) | |||
| 8703 | PyErr_SetString(_fblas_error,"failed in converting 7th argument `x' of _fblas.dgbmv to C/Fortran array" ); | |||
| 8704 | } else { | |||
| 8705 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 8706 | ||||
| 8707 | CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx),"len(x)>offx+(trans==0?m-1:n-1)*abs(incx)","7th argument x")if (!(x_Dims[0]>offx+(trans==0?m-1:n-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(trans==0?m-1:n-1)*abs(incx)" ") failed for ""7th argument x"); } else { | |||
| 8708 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","7th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "7th argument x"); } else { | |||
| 8709 | /*end of frompyobj*/ | |||
| 8710 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8711 | f2py_start_call_clock(); | |||
| 8712 | #endif | |||
| 8713 | /*callfortranroutine*/ | |||
| 8714 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&kl,&ku,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 8715 | /*(*f2py_func)(&m,&n,&kl,&ku,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&trans,&ly);*/ | |||
| 8716 | if (PyErr_Occurred()) | |||
| 8717 | f2py_success = 0; | |||
| 8718 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8719 | f2py_stop_call_clock(); | |||
| 8720 | #endif | |||
| 8721 | /*end of callfortranroutine*/ | |||
| 8722 | if (f2py_success) { | |||
| 8723 | /*pyobjfrom*/ | |||
| 8724 | /*end of pyobjfrom*/ | |||
| 8725 | CFUNCSMESS("Building return value.\n"); | |||
| 8726 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 8727 | /*closepyobjfrom*/ | |||
| 8728 | /*end of closepyobjfrom*/ | |||
| 8729 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 8730 | /*cleanupfrompyobj*/ | |||
| 8731 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 8732 | } /*CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx))*/ | |||
| 8733 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 8734 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 8735 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 8736 | /* End of cleaning variable x */ | |||
| 8737 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 8738 | } /*CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy))*/ | |||
| 8739 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 8740 | /* End of cleaning variable y */ | |||
| 8741 | /* End of cleaning variable ly */ | |||
| 8742 | /* End of cleaning variable lda */ | |||
| 8743 | } /*CHECKSCALAR(n>=0&&n==shape(a,1))*/ | |||
| 8744 | } /*if (f2py_success) of n*/ | |||
| 8745 | /* End of cleaning variable n */ | |||
| 8746 | } /*CHECKSCALAR(m>=ku+kl+1)*/ | |||
| 8747 | } /*if (f2py_success) of m*/ | |||
| 8748 | /* End of cleaning variable m */ | |||
| 8749 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 8750 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 8751 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 8752 | /* End of cleaning variable a */ | |||
| 8753 | } /*if (f2py_success) of beta*/ | |||
| 8754 | /* End of cleaning variable beta */ | |||
| 8755 | } /*if (f2py_success) of alpha*/ | |||
| 8756 | /* End of cleaning variable alpha */ | |||
| 8757 | } /*if (f2py_success) of offy*/ | |||
| 8758 | /* End of cleaning variable offy */ | |||
| 8759 | } /*if (f2py_success) of offx*/ | |||
| 8760 | /* End of cleaning variable offx */ | |||
| 8761 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 8762 | } /*if (f2py_success) of incy*/ | |||
| 8763 | /* End of cleaning variable incy */ | |||
| 8764 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 8765 | } /*if (f2py_success) of incx*/ | |||
| 8766 | /* End of cleaning variable incx */ | |||
| 8767 | } /*CHECKSCALAR(ku>=0)*/ | |||
| 8768 | } /*if (f2py_success) of ku*/ | |||
| 8769 | /* End of cleaning variable ku */ | |||
| 8770 | } /*CHECKSCALAR(kl>=0)*/ | |||
| 8771 | } /*if (f2py_success) of kl*/ | |||
| 8772 | /* End of cleaning variable kl */ | |||
| 8773 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 8774 | } /*if (f2py_success) of trans*/ | |||
| 8775 | /* End of cleaning variable trans */ | |||
| 8776 | /*end of cleanupfrompyobj*/ | |||
| 8777 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 8778 | /*routdebugfailure*/ | |||
| 8779 | } else { | |||
| 8780 | /*routdebugleave*/ | |||
| 8781 | } | |||
| 8782 | CFUNCSMESS("Freeing memory.\n"); | |||
| 8783 | /*freemem*/ | |||
| 8784 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8785 | f2py_stop_clock(); | |||
| 8786 | #endif | |||
| 8787 | return capi_buildvalue; | |||
| 8788 | } | |||
| 8789 | /******************************** end of dgbmv ********************************/ | |||
| 8790 | ||||
| 8791 | /*********************************** cgbmv ***********************************/ | |||
| 8792 | static char doc_f2py_rout__fblas_cgbmv[] = "\ | |||
| 8793 | yout = cgbmv(m,n,kl,ku,alpha,a,x,[incx,offx,beta,y,incy,offy,trans,overwrite_y])\n\nWrapper for ``cgbmv``.\ | |||
| 8794 | \n\nParameters\n----------\n" | |||
| 8795 | "m : input int\n" | |||
| 8796 | "n : input int\n" | |||
| 8797 | "kl : input int\n" | |||
| 8798 | "ku : input int\n" | |||
| 8799 | "alpha : input complex\n" | |||
| 8800 | "a : input rank-2 array('F') with bounds (lda,n)\n" | |||
| 8801 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 8802 | "\nOther Parameters\n----------------\n" | |||
| 8803 | "incx : input int, optional\n Default: 1\n" | |||
| 8804 | "offx : input int, optional\n Default: 0\n" | |||
| 8805 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 8806 | "y : input rank-1 array('F') with bounds (ly)\n" | |||
| 8807 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 8808 | "incy : input int, optional\n Default: 1\n" | |||
| 8809 | "offy : input int, optional\n Default: 0\n" | |||
| 8810 | "trans : input int, optional\n Default: 0\n" | |||
| 8811 | "\nReturns\n-------\n" | |||
| 8812 | "yout : rank-1 array('F') with bounds (ly) and y storage"; | |||
| 8813 | /* extern void F_FUNC(cgbmv,CGBMV)(char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 8814 | static PyObject *f2py_rout__fblas_cgbmv(const PyObject *capi_self, | |||
| 8815 | PyObject *capi_args, | |||
| 8816 | PyObject *capi_keywds, | |||
| 8817 | void (*f2py_func)(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 8818 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 8819 | volatile int f2py_success = 1; | |||
| 8820 | /*decl*/ | |||
| 8821 | ||||
| 8822 | int m = 0; | |||
| 8823 | PyObject *m_capi = Py_None(&_Py_NoneStruct); | |||
| 8824 | int n = 0; | |||
| 8825 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 8826 | int kl = 0; | |||
| 8827 | PyObject *kl_capi = Py_None(&_Py_NoneStruct); | |||
| 8828 | int ku = 0; | |||
| 8829 | PyObject *ku_capi = Py_None(&_Py_NoneStruct); | |||
| 8830 | complex_float alpha; | |||
| 8831 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 8832 | complex_float *a = NULL((void*)0); | |||
| 8833 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 8834 | const int a_Rank = 2; | |||
| 8835 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 8836 | int capi_a_intent = 0; | |||
| 8837 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 8838 | int lda = 0; | |||
| 8839 | complex_float *x = NULL((void*)0); | |||
| 8840 | npy_intp x_Dims[1] = {-1}; | |||
| 8841 | const int x_Rank = 1; | |||
| 8842 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 8843 | int capi_x_intent = 0; | |||
| 8844 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 8845 | int incx = 0; | |||
| 8846 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 8847 | int offx = 0; | |||
| 8848 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 8849 | complex_float beta; | |||
| 8850 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 8851 | complex_float *y = NULL((void*)0); | |||
| 8852 | npy_intp y_Dims[1] = {-1}; | |||
| 8853 | const int y_Rank = 1; | |||
| 8854 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 8855 | int capi_y_intent = 0; | |||
| 8856 | int capi_overwrite_y = 0; | |||
| 8857 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 8858 | int incy = 0; | |||
| 8859 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 8860 | int offy = 0; | |||
| 8861 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 8862 | int trans = 0; | |||
| 8863 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 8864 | int ly = 0; | |||
| 8865 | static char *capi_kwlist[] = {"m","n","kl","ku","alpha","a","x","incx","offx","beta","y","incy","offy","trans","overwrite_y",NULL((void*)0)}; | |||
| 8866 | ||||
| 8867 | /*routdebugenter*/ | |||
| 8868 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8869 | f2py_start_clock(); | |||
| 8870 | #endif | |||
| 8871 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 8872 | "OOOOOOO|OOOOOOOi:_fblas.cgbmv",\ | |||
| 8873 | capi_kwlist,&m_capi,&n_capi,&kl_capi,&ku_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 8874 | return NULL((void*)0); | |||
| 8875 | /*frompyobj*/ | |||
| 8876 | /* Processing variable trans */ | |||
| 8877 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 8878 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.cgbmv() 7th keyword (trans) can't be converted to int"); | |||
| 8879 | if (f2py_success) { | |||
| 8880 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","cgbmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cgbmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 8881 | /* Processing variable kl */ | |||
| 8882 | f2py_success = int_from_pyobj(&kl,kl_capi,"_fblas.cgbmv() 3rd argument (kl) can't be converted to int"); | |||
| 8883 | if (f2py_success) { | |||
| 8884 | CHECKSCALAR(kl>=0,"kl>=0","3rd argument kl","cgbmv:kl=%d",kl)if (!(kl>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgbmv:kl=%d", "(""kl>=0"") failed for ""3rd argument kl" , kl); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8885 | /* Processing variable ku */ | |||
| 8886 | f2py_success = int_from_pyobj(&ku,ku_capi,"_fblas.cgbmv() 4th argument (ku) can't be converted to int"); | |||
| 8887 | if (f2py_success) { | |||
| 8888 | CHECKSCALAR(ku>=0,"ku>=0","4th argument ku","cgbmv:ku=%d",ku)if (!(ku>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgbmv:ku=%d", "(""ku>=0"") failed for ""4th argument ku" , ku); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8889 | /* Processing variable incx */ | |||
| 8890 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 8891 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cgbmv() 1st keyword (incx) can't be converted to int"); | |||
| 8892 | if (f2py_success) { | |||
| 8893 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","cgbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8894 | /* Processing variable incy */ | |||
| 8895 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 8896 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cgbmv() 5th keyword (incy) can't be converted to int"); | |||
| 8897 | if (f2py_success) { | |||
| 8898 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","cgbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 8899 | /* Processing variable offx */ | |||
| 8900 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 8901 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cgbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 8902 | if (f2py_success) { | |||
| 8903 | /* Processing variable offy */ | |||
| 8904 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 8905 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cgbmv() 6th keyword (offy) can't be converted to int"); | |||
| 8906 | if (f2py_success) { | |||
| 8907 | /* Processing variable alpha */ | |||
| 8908 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cgbmv() 5th argument (alpha) can't be converted to complex_float"); | |||
| 8909 | if (f2py_success) { | |||
| 8910 | /* Processing variable beta */ | |||
| 8911 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 8912 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.cgbmv() 3rd keyword (beta) can't be converted to complex_float"); | |||
| 8913 | if (f2py_success) { | |||
| 8914 | /* Processing variable a */ | |||
| 8915 | ; | |||
| 8916 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 8917 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 8918 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 8919 | if (!PyErr_Occurred()) | |||
| 8920 | PyErr_SetString(_fblas_error,"failed in converting 6th argument `a' of _fblas.cgbmv to C/Fortran array" ); | |||
| 8921 | } else { | |||
| 8922 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 8923 | ||||
| 8924 | /* Processing variable m */ | |||
| 8925 | f2py_success = int_from_pyobj(&m,m_capi,"_fblas.cgbmv() 1st argument (m) can't be converted to int"); | |||
| 8926 | if (f2py_success) { | |||
| 8927 | CHECKSCALAR(m>=ku+kl+1,"m>=ku+kl+1","1st argument m","cgbmv:m=%d",m)if (!(m>=ku+kl+1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgbmv:m=%d", "(""m>=ku+kl+1"") failed for ""1st argument m" , m); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 8928 | /* Processing variable n */ | |||
| 8929 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cgbmv() 2nd argument (n) can't be converted to int"); | |||
| 8930 | if (f2py_success) { | |||
| 8931 | CHECKSCALAR(n>=0&&n==shape(a,1),"n>=0&&n==shape(a,1)","2nd argument n","cgbmv:n=%d",n)if (!(n>=0&&n==a_Dims[1])) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgbmv:n=%d", "(""n>=0&&n==shape(a,1)"") failed for " "2nd argument n", n); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 8932 | /* Processing variable lda */ | |||
| 8933 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 8934 | /* Processing variable ly */ | |||
| 8935 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(trans==0?m-1:n-1)*abs(incy):-1); | |||
| 8936 | /* Processing variable y */ | |||
| 8937 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 8938 | y_Dims[0]=ly; | |||
| 8939 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 8940 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 8941 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 8942 | if (!PyErr_Occurred()) | |||
| 8943 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.cgbmv to C/Fortran array" ); | |||
| 8944 | } else { | |||
| 8945 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 8946 | ||||
| 8947 | CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy),"len(y)>offy+(trans==0?m-1:n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(trans==0?m-1:n-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(trans==0?m-1:n-1)*abs(incy)" ") failed for ""4th keyword y"); } else { | |||
| 8948 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 8949 | /* Processing variable x */ | |||
| 8950 | ; | |||
| 8951 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 8952 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 8953 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 8954 | if (!PyErr_Occurred()) | |||
| 8955 | PyErr_SetString(_fblas_error,"failed in converting 7th argument `x' of _fblas.cgbmv to C/Fortran array" ); | |||
| 8956 | } else { | |||
| 8957 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 8958 | ||||
| 8959 | CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx),"len(x)>offx+(trans==0?m-1:n-1)*abs(incx)","7th argument x")if (!(x_Dims[0]>offx+(trans==0?m-1:n-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(trans==0?m-1:n-1)*abs(incx)" ") failed for ""7th argument x"); } else { | |||
| 8960 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","7th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "7th argument x"); } else { | |||
| 8961 | /*end of frompyobj*/ | |||
| 8962 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8963 | f2py_start_call_clock(); | |||
| 8964 | #endif | |||
| 8965 | /*callfortranroutine*/ | |||
| 8966 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&kl,&ku,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 8967 | /*(*f2py_func)(&m,&n,&kl,&ku,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&trans,&ly);*/ | |||
| 8968 | if (PyErr_Occurred()) | |||
| 8969 | f2py_success = 0; | |||
| 8970 | #ifdef F2PY_REPORT_ATEXIT | |||
| 8971 | f2py_stop_call_clock(); | |||
| 8972 | #endif | |||
| 8973 | /*end of callfortranroutine*/ | |||
| 8974 | if (f2py_success) { | |||
| 8975 | /*pyobjfrom*/ | |||
| 8976 | /*end of pyobjfrom*/ | |||
| 8977 | CFUNCSMESS("Building return value.\n"); | |||
| 8978 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 8979 | /*closepyobjfrom*/ | |||
| 8980 | /*end of closepyobjfrom*/ | |||
| 8981 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 8982 | /*cleanupfrompyobj*/ | |||
| 8983 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 8984 | } /*CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx))*/ | |||
| 8985 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 8986 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 8987 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 8988 | /* End of cleaning variable x */ | |||
| 8989 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 8990 | } /*CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy))*/ | |||
| 8991 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 8992 | /* End of cleaning variable y */ | |||
| 8993 | /* End of cleaning variable ly */ | |||
| 8994 | /* End of cleaning variable lda */ | |||
| 8995 | } /*CHECKSCALAR(n>=0&&n==shape(a,1))*/ | |||
| 8996 | } /*if (f2py_success) of n*/ | |||
| 8997 | /* End of cleaning variable n */ | |||
| 8998 | } /*CHECKSCALAR(m>=ku+kl+1)*/ | |||
| 8999 | } /*if (f2py_success) of m*/ | |||
| 9000 | /* End of cleaning variable m */ | |||
| 9001 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 9002 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 9003 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 9004 | /* End of cleaning variable a */ | |||
| 9005 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 9006 | /* End of cleaning variable beta */ | |||
| 9007 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 9008 | /* End of cleaning variable alpha */ | |||
| 9009 | } /*if (f2py_success) of offy*/ | |||
| 9010 | /* End of cleaning variable offy */ | |||
| 9011 | } /*if (f2py_success) of offx*/ | |||
| 9012 | /* End of cleaning variable offx */ | |||
| 9013 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 9014 | } /*if (f2py_success) of incy*/ | |||
| 9015 | /* End of cleaning variable incy */ | |||
| 9016 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 9017 | } /*if (f2py_success) of incx*/ | |||
| 9018 | /* End of cleaning variable incx */ | |||
| 9019 | } /*CHECKSCALAR(ku>=0)*/ | |||
| 9020 | } /*if (f2py_success) of ku*/ | |||
| 9021 | /* End of cleaning variable ku */ | |||
| 9022 | } /*CHECKSCALAR(kl>=0)*/ | |||
| 9023 | } /*if (f2py_success) of kl*/ | |||
| 9024 | /* End of cleaning variable kl */ | |||
| 9025 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 9026 | } /*if (f2py_success) of trans*/ | |||
| 9027 | /* End of cleaning variable trans */ | |||
| 9028 | /*end of cleanupfrompyobj*/ | |||
| 9029 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 9030 | /*routdebugfailure*/ | |||
| 9031 | } else { | |||
| 9032 | /*routdebugleave*/ | |||
| 9033 | } | |||
| 9034 | CFUNCSMESS("Freeing memory.\n"); | |||
| 9035 | /*freemem*/ | |||
| 9036 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9037 | f2py_stop_clock(); | |||
| 9038 | #endif | |||
| 9039 | return capi_buildvalue; | |||
| 9040 | } | |||
| 9041 | /******************************** end of cgbmv ********************************/ | |||
| 9042 | ||||
| 9043 | /*********************************** zgbmv ***********************************/ | |||
| 9044 | static char doc_f2py_rout__fblas_zgbmv[] = "\ | |||
| 9045 | yout = zgbmv(m,n,kl,ku,alpha,a,x,[incx,offx,beta,y,incy,offy,trans,overwrite_y])\n\nWrapper for ``zgbmv``.\ | |||
| 9046 | \n\nParameters\n----------\n" | |||
| 9047 | "m : input int\n" | |||
| 9048 | "n : input int\n" | |||
| 9049 | "kl : input int\n" | |||
| 9050 | "ku : input int\n" | |||
| 9051 | "alpha : input complex\n" | |||
| 9052 | "a : input rank-2 array('D') with bounds (lda,n)\n" | |||
| 9053 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 9054 | "\nOther Parameters\n----------------\n" | |||
| 9055 | "incx : input int, optional\n Default: 1\n" | |||
| 9056 | "offx : input int, optional\n Default: 0\n" | |||
| 9057 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 9058 | "y : input rank-1 array('D') with bounds (ly)\n" | |||
| 9059 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 9060 | "incy : input int, optional\n Default: 1\n" | |||
| 9061 | "offy : input int, optional\n Default: 0\n" | |||
| 9062 | "trans : input int, optional\n Default: 0\n" | |||
| 9063 | "\nReturns\n-------\n" | |||
| 9064 | "yout : rank-1 array('D') with bounds (ly) and y storage"; | |||
| 9065 | /* extern void F_FUNC(zgbmv,ZGBMV)(char*,F_INT*,F_INT*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 9066 | static PyObject *f2py_rout__fblas_zgbmv(const PyObject *capi_self, | |||
| 9067 | PyObject *capi_args, | |||
| 9068 | PyObject *capi_keywds, | |||
| 9069 | void (*f2py_func)(char*,F_INTint*,F_INTint*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 9070 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 9071 | volatile int f2py_success = 1; | |||
| 9072 | /*decl*/ | |||
| 9073 | ||||
| 9074 | int m = 0; | |||
| 9075 | PyObject *m_capi = Py_None(&_Py_NoneStruct); | |||
| 9076 | int n = 0; | |||
| 9077 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 9078 | int kl = 0; | |||
| 9079 | PyObject *kl_capi = Py_None(&_Py_NoneStruct); | |||
| 9080 | int ku = 0; | |||
| 9081 | PyObject *ku_capi = Py_None(&_Py_NoneStruct); | |||
| 9082 | complex_double alpha; | |||
| 9083 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 9084 | complex_double *a = NULL((void*)0); | |||
| 9085 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 9086 | const int a_Rank = 2; | |||
| 9087 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 9088 | int capi_a_intent = 0; | |||
| 9089 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 9090 | int lda = 0; | |||
| 9091 | complex_double *x = NULL((void*)0); | |||
| 9092 | npy_intp x_Dims[1] = {-1}; | |||
| 9093 | const int x_Rank = 1; | |||
| 9094 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 9095 | int capi_x_intent = 0; | |||
| 9096 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 9097 | int incx = 0; | |||
| 9098 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 9099 | int offx = 0; | |||
| 9100 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 9101 | complex_double beta; | |||
| 9102 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 9103 | complex_double *y = NULL((void*)0); | |||
| 9104 | npy_intp y_Dims[1] = {-1}; | |||
| 9105 | const int y_Rank = 1; | |||
| 9106 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 9107 | int capi_y_intent = 0; | |||
| 9108 | int capi_overwrite_y = 0; | |||
| 9109 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 9110 | int incy = 0; | |||
| 9111 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 9112 | int offy = 0; | |||
| 9113 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 9114 | int trans = 0; | |||
| 9115 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 9116 | int ly = 0; | |||
| 9117 | static char *capi_kwlist[] = {"m","n","kl","ku","alpha","a","x","incx","offx","beta","y","incy","offy","trans","overwrite_y",NULL((void*)0)}; | |||
| 9118 | ||||
| 9119 | /*routdebugenter*/ | |||
| 9120 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9121 | f2py_start_clock(); | |||
| 9122 | #endif | |||
| 9123 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 9124 | "OOOOOOO|OOOOOOOi:_fblas.zgbmv",\ | |||
| 9125 | capi_kwlist,&m_capi,&n_capi,&kl_capi,&ku_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&trans_capi,&capi_overwrite_y)) | |||
| 9126 | return NULL((void*)0); | |||
| 9127 | /*frompyobj*/ | |||
| 9128 | /* Processing variable trans */ | |||
| 9129 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 9130 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.zgbmv() 7th keyword (trans) can't be converted to int"); | |||
| 9131 | if (f2py_success) { | |||
| 9132 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","7th keyword trans","zgbmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zgbmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""7th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 9133 | /* Processing variable kl */ | |||
| 9134 | f2py_success = int_from_pyobj(&kl,kl_capi,"_fblas.zgbmv() 3rd argument (kl) can't be converted to int"); | |||
| 9135 | if (f2py_success) { | |||
| 9136 | CHECKSCALAR(kl>=0,"kl>=0","3rd argument kl","zgbmv:kl=%d",kl)if (!(kl>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgbmv:kl=%d", "(""kl>=0"") failed for ""3rd argument kl" , kl); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 9137 | /* Processing variable ku */ | |||
| 9138 | f2py_success = int_from_pyobj(&ku,ku_capi,"_fblas.zgbmv() 4th argument (ku) can't be converted to int"); | |||
| 9139 | if (f2py_success) { | |||
| 9140 | CHECKSCALAR(ku>=0,"ku>=0","4th argument ku","zgbmv:ku=%d",ku)if (!(ku>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgbmv:ku=%d", "(""ku>=0"") failed for ""4th argument ku" , ku); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 9141 | /* Processing variable incx */ | |||
| 9142 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 9143 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zgbmv() 1st keyword (incx) can't be converted to int"); | |||
| 9144 | if (f2py_success) { | |||
| 9145 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zgbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9146 | /* Processing variable incy */ | |||
| 9147 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 9148 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zgbmv() 5th keyword (incy) can't be converted to int"); | |||
| 9149 | if (f2py_success) { | |||
| 9150 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zgbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9151 | /* Processing variable offx */ | |||
| 9152 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 9153 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zgbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 9154 | if (f2py_success) { | |||
| 9155 | /* Processing variable offy */ | |||
| 9156 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 9157 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zgbmv() 6th keyword (offy) can't be converted to int"); | |||
| 9158 | if (f2py_success) { | |||
| 9159 | /* Processing variable alpha */ | |||
| 9160 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zgbmv() 5th argument (alpha) can't be converted to complex_double"); | |||
| 9161 | if (f2py_success) { | |||
| 9162 | /* Processing variable beta */ | |||
| 9163 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 9164 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zgbmv() 3rd keyword (beta) can't be converted to complex_double"); | |||
| 9165 | if (f2py_success) { | |||
| 9166 | /* Processing variable a */ | |||
| 9167 | ; | |||
| 9168 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 9169 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 9170 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 9171 | if (!PyErr_Occurred()) | |||
| 9172 | PyErr_SetString(_fblas_error,"failed in converting 6th argument `a' of _fblas.zgbmv to C/Fortran array" ); | |||
| 9173 | } else { | |||
| 9174 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 9175 | ||||
| 9176 | /* Processing variable m */ | |||
| 9177 | f2py_success = int_from_pyobj(&m,m_capi,"_fblas.zgbmv() 1st argument (m) can't be converted to int"); | |||
| 9178 | if (f2py_success) { | |||
| 9179 | CHECKSCALAR(m>=ku+kl+1,"m>=ku+kl+1","1st argument m","zgbmv:m=%d",m)if (!(m>=ku+kl+1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgbmv:m=%d", "(""m>=ku+kl+1"") failed for ""1st argument m" , m); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 9180 | /* Processing variable n */ | |||
| 9181 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zgbmv() 2nd argument (n) can't be converted to int"); | |||
| 9182 | if (f2py_success) { | |||
| 9183 | CHECKSCALAR(n>=0&&n==shape(a,1),"n>=0&&n==shape(a,1)","2nd argument n","zgbmv:n=%d",n)if (!(n>=0&&n==a_Dims[1])) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgbmv:n=%d", "(""n>=0&&n==shape(a,1)"") failed for " "2nd argument n", n); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 9184 | /* Processing variable lda */ | |||
| 9185 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 9186 | /* Processing variable ly */ | |||
| 9187 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(trans==0?m-1:n-1)*abs(incy):-1); | |||
| 9188 | /* Processing variable y */ | |||
| 9189 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 9190 | y_Dims[0]=ly; | |||
| 9191 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 9192 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 9193 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 9194 | if (!PyErr_Occurred()) | |||
| 9195 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.zgbmv to C/Fortran array" ); | |||
| 9196 | } else { | |||
| 9197 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 9198 | ||||
| 9199 | CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy),"len(y)>offy+(trans==0?m-1:n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(trans==0?m-1:n-1)*abs(incy))) { PyErr_SetString (_fblas_error,"(""len(y)>offy+(trans==0?m-1:n-1)*abs(incy)" ") failed for ""4th keyword y"); } else { | |||
| 9200 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 9201 | /* Processing variable x */ | |||
| 9202 | ; | |||
| 9203 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 9204 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 9205 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 9206 | if (!PyErr_Occurred()) | |||
| 9207 | PyErr_SetString(_fblas_error,"failed in converting 7th argument `x' of _fblas.zgbmv to C/Fortran array" ); | |||
| 9208 | } else { | |||
| 9209 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 9210 | ||||
| 9211 | CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx),"len(x)>offx+(trans==0?m-1:n-1)*abs(incx)","7th argument x")if (!(x_Dims[0]>offx+(trans==0?m-1:n-1)*abs(incx))) { PyErr_SetString (_fblas_error,"(""len(x)>offx+(trans==0?m-1:n-1)*abs(incx)" ") failed for ""7th argument x"); } else { | |||
| 9212 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","7th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "7th argument x"); } else { | |||
| 9213 | /*end of frompyobj*/ | |||
| 9214 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9215 | f2py_start_call_clock(); | |||
| 9216 | #endif | |||
| 9217 | /*callfortranroutine*/ | |||
| 9218 | (*f2py_func)((trans?(trans==2?"C":"T"):"N"),&m,&n,&kl,&ku,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 9219 | /*(*f2py_func)(&m,&n,&kl,&ku,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&trans,&ly);*/ | |||
| 9220 | if (PyErr_Occurred()) | |||
| 9221 | f2py_success = 0; | |||
| 9222 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9223 | f2py_stop_call_clock(); | |||
| 9224 | #endif | |||
| 9225 | /*end of callfortranroutine*/ | |||
| 9226 | if (f2py_success) { | |||
| 9227 | /*pyobjfrom*/ | |||
| 9228 | /*end of pyobjfrom*/ | |||
| 9229 | CFUNCSMESS("Building return value.\n"); | |||
| 9230 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 9231 | /*closepyobjfrom*/ | |||
| 9232 | /*end of closepyobjfrom*/ | |||
| 9233 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 9234 | /*cleanupfrompyobj*/ | |||
| 9235 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 9236 | } /*CHECKARRAY(len(x)>offx+(trans==0?m-1:n-1)*abs(incx))*/ | |||
| 9237 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 9238 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 9239 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 9240 | /* End of cleaning variable x */ | |||
| 9241 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 9242 | } /*CHECKARRAY(len(y)>offy+(trans==0?m-1:n-1)*abs(incy))*/ | |||
| 9243 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 9244 | /* End of cleaning variable y */ | |||
| 9245 | /* End of cleaning variable ly */ | |||
| 9246 | /* End of cleaning variable lda */ | |||
| 9247 | } /*CHECKSCALAR(n>=0&&n==shape(a,1))*/ | |||
| 9248 | } /*if (f2py_success) of n*/ | |||
| 9249 | /* End of cleaning variable n */ | |||
| 9250 | } /*CHECKSCALAR(m>=ku+kl+1)*/ | |||
| 9251 | } /*if (f2py_success) of m*/ | |||
| 9252 | /* End of cleaning variable m */ | |||
| 9253 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 9254 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 9255 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 9256 | /* End of cleaning variable a */ | |||
| 9257 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 9258 | /* End of cleaning variable beta */ | |||
| 9259 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 9260 | /* End of cleaning variable alpha */ | |||
| 9261 | } /*if (f2py_success) of offy*/ | |||
| 9262 | /* End of cleaning variable offy */ | |||
| 9263 | } /*if (f2py_success) of offx*/ | |||
| 9264 | /* End of cleaning variable offx */ | |||
| 9265 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 9266 | } /*if (f2py_success) of incy*/ | |||
| 9267 | /* End of cleaning variable incy */ | |||
| 9268 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 9269 | } /*if (f2py_success) of incx*/ | |||
| 9270 | /* End of cleaning variable incx */ | |||
| 9271 | } /*CHECKSCALAR(ku>=0)*/ | |||
| 9272 | } /*if (f2py_success) of ku*/ | |||
| 9273 | /* End of cleaning variable ku */ | |||
| 9274 | } /*CHECKSCALAR(kl>=0)*/ | |||
| 9275 | } /*if (f2py_success) of kl*/ | |||
| 9276 | /* End of cleaning variable kl */ | |||
| 9277 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 9278 | } /*if (f2py_success) of trans*/ | |||
| 9279 | /* End of cleaning variable trans */ | |||
| 9280 | /*end of cleanupfrompyobj*/ | |||
| 9281 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 9282 | /*routdebugfailure*/ | |||
| 9283 | } else { | |||
| 9284 | /*routdebugleave*/ | |||
| 9285 | } | |||
| 9286 | CFUNCSMESS("Freeing memory.\n"); | |||
| 9287 | /*freemem*/ | |||
| 9288 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9289 | f2py_stop_clock(); | |||
| 9290 | #endif | |||
| 9291 | return capi_buildvalue; | |||
| 9292 | } | |||
| 9293 | /******************************** end of zgbmv ********************************/ | |||
| 9294 | ||||
| 9295 | /*********************************** ssbmv ***********************************/ | |||
| 9296 | static char doc_f2py_rout__fblas_ssbmv[] = "\ | |||
| 9297 | yout = ssbmv(k,alpha,a,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``ssbmv``.\ | |||
| 9298 | \n\nParameters\n----------\n" | |||
| 9299 | "k : input int\n" | |||
| 9300 | "alpha : input float\n" | |||
| 9301 | "a : input rank-2 array('f') with bounds (lda,n)\n" | |||
| 9302 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 9303 | "\nOther Parameters\n----------------\n" | |||
| 9304 | "incx : input int, optional\n Default: 1\n" | |||
| 9305 | "offx : input int, optional\n Default: 0\n" | |||
| 9306 | "beta : input float, optional\n Default: 0.0\n" | |||
| 9307 | "y : input rank-1 array('f') with bounds (ly)\n" | |||
| 9308 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 9309 | "incy : input int, optional\n Default: 1\n" | |||
| 9310 | "offy : input int, optional\n Default: 0\n" | |||
| 9311 | "lower : input int, optional\n Default: 0\n" | |||
| 9312 | "\nReturns\n-------\n" | |||
| 9313 | "yout : rank-1 array('f') with bounds (ly) and y storage"; | |||
| 9314 | /* extern void F_FUNC(ssbmv,SSBMV)(char*,F_INT*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*,float*,F_INT* ); */ | |||
| 9315 | static PyObject *f2py_rout__fblas_ssbmv(const PyObject *capi_self, | |||
| 9316 | PyObject *capi_args, | |||
| 9317 | PyObject *capi_keywds, | |||
| 9318 | void (*f2py_func)(char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*,float*,F_INTint* )) { | |||
| 9319 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 9320 | volatile int f2py_success = 1; | |||
| 9321 | /*decl*/ | |||
| 9322 | ||||
| 9323 | int n = 0; | |||
| 9324 | int k = 0; | |||
| 9325 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 9326 | float alpha = 0; | |||
| 9327 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 9328 | float *a = NULL((void*)0); | |||
| 9329 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 9330 | const int a_Rank = 2; | |||
| 9331 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 9332 | int capi_a_intent = 0; | |||
| 9333 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 9334 | int lda = 0; | |||
| 9335 | float *x = NULL((void*)0); | |||
| 9336 | npy_intp x_Dims[1] = {-1}; | |||
| 9337 | const int x_Rank = 1; | |||
| 9338 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 9339 | int capi_x_intent = 0; | |||
| 9340 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 9341 | int incx = 0; | |||
| 9342 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 9343 | int offx = 0; | |||
| 9344 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 9345 | float beta = 0; | |||
| 9346 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 9347 | float *y = NULL((void*)0); | |||
| 9348 | npy_intp y_Dims[1] = {-1}; | |||
| 9349 | const int y_Rank = 1; | |||
| 9350 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 9351 | int capi_y_intent = 0; | |||
| 9352 | int capi_overwrite_y = 0; | |||
| 9353 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 9354 | int incy = 0; | |||
| 9355 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 9356 | int offy = 0; | |||
| 9357 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 9358 | int lower = 0; | |||
| 9359 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 9360 | int ly = 0; | |||
| 9361 | static char *capi_kwlist[] = {"k","alpha","a","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 9362 | ||||
| 9363 | /*routdebugenter*/ | |||
| 9364 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9365 | f2py_start_clock(); | |||
| 9366 | #endif | |||
| 9367 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 9368 | "OOOO|OOOOOOOi:_fblas.ssbmv",\ | |||
| 9369 | capi_kwlist,&k_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 9370 | return NULL((void*)0); | |||
| 9371 | /*frompyobj*/ | |||
| 9372 | /* Processing variable lower */ | |||
| 9373 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 9374 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssbmv() 7th keyword (lower) can't be converted to int"); | |||
| 9375 | if (f2py_success) { | |||
| 9376 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","ssbmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssbmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9377 | /* Processing variable incx */ | |||
| 9378 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 9379 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ssbmv() 1st keyword (incx) can't be converted to int"); | |||
| 9380 | if (f2py_success) { | |||
| 9381 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ssbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9382 | /* Processing variable incy */ | |||
| 9383 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 9384 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.ssbmv() 5th keyword (incy) can't be converted to int"); | |||
| 9385 | if (f2py_success) { | |||
| 9386 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","ssbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9387 | /* Processing variable offx */ | |||
| 9388 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 9389 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ssbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 9390 | if (f2py_success) { | |||
| 9391 | /* Processing variable offy */ | |||
| 9392 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 9393 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.ssbmv() 6th keyword (offy) can't be converted to int"); | |||
| 9394 | if (f2py_success) { | |||
| 9395 | /* Processing variable alpha */ | |||
| 9396 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssbmv() 2nd argument (alpha) can't be converted to float"); | |||
| 9397 | if (f2py_success) { | |||
| 9398 | /* Processing variable beta */ | |||
| 9399 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 9400 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.ssbmv() 3rd keyword (beta) can't be converted to float"); | |||
| 9401 | if (f2py_success) { | |||
| 9402 | /* Processing variable a */ | |||
| 9403 | ; | |||
| 9404 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 9405 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 9406 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 9407 | if (!PyErr_Occurred()) | |||
| 9408 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `a' of _fblas.ssbmv to C/Fortran array" ); | |||
| 9409 | } else { | |||
| 9410 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 9411 | ||||
| 9412 | /* Processing variable n */ | |||
| 9413 | n = shape(a,1)a_Dims[1]; | |||
| 9414 | CHECKSCALAR(n>=0,"n>=0","hidden n","ssbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 9415 | /* Processing variable lda */ | |||
| 9416 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 9417 | /* Processing variable k */ | |||
| 9418 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.ssbmv() 1st argument (k) can't be converted to int"); | |||
| 9419 | if (f2py_success) { | |||
| 9420 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","ssbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 9421 | /* Processing variable ly */ | |||
| 9422 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 9423 | /* Processing variable y */ | |||
| 9424 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 9425 | y_Dims[0]=ly; | |||
| 9426 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 9427 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 9428 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 9429 | if (!PyErr_Occurred()) | |||
| 9430 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.ssbmv to C/Fortran array" ); | |||
| 9431 | } else { | |||
| 9432 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 9433 | ||||
| 9434 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 9435 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 9436 | /* Processing variable x */ | |||
| 9437 | ; | |||
| 9438 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 9439 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 9440 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 9441 | if (!PyErr_Occurred()) | |||
| 9442 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.ssbmv to C/Fortran array" ); | |||
| 9443 | } else { | |||
| 9444 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 9445 | ||||
| 9446 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 9447 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 9448 | /*end of frompyobj*/ | |||
| 9449 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9450 | f2py_start_call_clock(); | |||
| 9451 | #endif | |||
| 9452 | /*callfortranroutine*/ | |||
| 9453 | (*f2py_func)((lower?"L":"U"),&n,&k,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 9454 | /*(*f2py_func)(&n,&k,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 9455 | if (PyErr_Occurred()) | |||
| 9456 | f2py_success = 0; | |||
| 9457 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9458 | f2py_stop_call_clock(); | |||
| 9459 | #endif | |||
| 9460 | /*end of callfortranroutine*/ | |||
| 9461 | if (f2py_success) { | |||
| 9462 | /*pyobjfrom*/ | |||
| 9463 | /*end of pyobjfrom*/ | |||
| 9464 | CFUNCSMESS("Building return value.\n"); | |||
| 9465 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 9466 | /*closepyobjfrom*/ | |||
| 9467 | /*end of closepyobjfrom*/ | |||
| 9468 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 9469 | /*cleanupfrompyobj*/ | |||
| 9470 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 9471 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 9472 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 9473 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 9474 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 9475 | /* End of cleaning variable x */ | |||
| 9476 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 9477 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 9478 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 9479 | /* End of cleaning variable y */ | |||
| 9480 | /* End of cleaning variable ly */ | |||
| 9481 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 9482 | } /*if (f2py_success) of k*/ | |||
| 9483 | /* End of cleaning variable k */ | |||
| 9484 | /* End of cleaning variable lda */ | |||
| 9485 | } /*CHECKSCALAR(n>=0)*/ | |||
| 9486 | /* End of cleaning variable n */ | |||
| 9487 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 9488 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 9489 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 9490 | /* End of cleaning variable a */ | |||
| 9491 | } /*if (f2py_success) of beta*/ | |||
| 9492 | /* End of cleaning variable beta */ | |||
| 9493 | } /*if (f2py_success) of alpha*/ | |||
| 9494 | /* End of cleaning variable alpha */ | |||
| 9495 | } /*if (f2py_success) of offy*/ | |||
| 9496 | /* End of cleaning variable offy */ | |||
| 9497 | } /*if (f2py_success) of offx*/ | |||
| 9498 | /* End of cleaning variable offx */ | |||
| 9499 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 9500 | } /*if (f2py_success) of incy*/ | |||
| 9501 | /* End of cleaning variable incy */ | |||
| 9502 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 9503 | } /*if (f2py_success) of incx*/ | |||
| 9504 | /* End of cleaning variable incx */ | |||
| 9505 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 9506 | } /*if (f2py_success) of lower*/ | |||
| 9507 | /* End of cleaning variable lower */ | |||
| 9508 | /*end of cleanupfrompyobj*/ | |||
| 9509 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 9510 | /*routdebugfailure*/ | |||
| 9511 | } else { | |||
| 9512 | /*routdebugleave*/ | |||
| 9513 | } | |||
| 9514 | CFUNCSMESS("Freeing memory.\n"); | |||
| 9515 | /*freemem*/ | |||
| 9516 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9517 | f2py_stop_clock(); | |||
| 9518 | #endif | |||
| 9519 | return capi_buildvalue; | |||
| 9520 | } | |||
| 9521 | /******************************** end of ssbmv ********************************/ | |||
| 9522 | ||||
| 9523 | /*********************************** dsbmv ***********************************/ | |||
| 9524 | static char doc_f2py_rout__fblas_dsbmv[] = "\ | |||
| 9525 | yout = dsbmv(k,alpha,a,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``dsbmv``.\ | |||
| 9526 | \n\nParameters\n----------\n" | |||
| 9527 | "k : input int\n" | |||
| 9528 | "alpha : input float\n" | |||
| 9529 | "a : input rank-2 array('d') with bounds (lda,n)\n" | |||
| 9530 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 9531 | "\nOther Parameters\n----------------\n" | |||
| 9532 | "incx : input int, optional\n Default: 1\n" | |||
| 9533 | "offx : input int, optional\n Default: 0\n" | |||
| 9534 | "beta : input float, optional\n Default: 0.0\n" | |||
| 9535 | "y : input rank-1 array('d') with bounds (ly)\n" | |||
| 9536 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 9537 | "incy : input int, optional\n Default: 1\n" | |||
| 9538 | "offy : input int, optional\n Default: 0\n" | |||
| 9539 | "lower : input int, optional\n Default: 0\n" | |||
| 9540 | "\nReturns\n-------\n" | |||
| 9541 | "yout : rank-1 array('d') with bounds (ly) and y storage"; | |||
| 9542 | /* extern void F_FUNC(dsbmv,DSBMV)(char*,F_INT*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*,double*,F_INT* ); */ | |||
| 9543 | static PyObject *f2py_rout__fblas_dsbmv(const PyObject *capi_self, | |||
| 9544 | PyObject *capi_args, | |||
| 9545 | PyObject *capi_keywds, | |||
| 9546 | void (*f2py_func)(char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*,double*,F_INTint* )) { | |||
| 9547 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 9548 | volatile int f2py_success = 1; | |||
| 9549 | /*decl*/ | |||
| 9550 | ||||
| 9551 | int n = 0; | |||
| 9552 | int k = 0; | |||
| 9553 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 9554 | double alpha = 0; | |||
| 9555 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 9556 | double *a = NULL((void*)0); | |||
| 9557 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 9558 | const int a_Rank = 2; | |||
| 9559 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 9560 | int capi_a_intent = 0; | |||
| 9561 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 9562 | int lda = 0; | |||
| 9563 | double *x = NULL((void*)0); | |||
| 9564 | npy_intp x_Dims[1] = {-1}; | |||
| 9565 | const int x_Rank = 1; | |||
| 9566 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 9567 | int capi_x_intent = 0; | |||
| 9568 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 9569 | int incx = 0; | |||
| 9570 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 9571 | int offx = 0; | |||
| 9572 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 9573 | double beta = 0; | |||
| 9574 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 9575 | double *y = NULL((void*)0); | |||
| 9576 | npy_intp y_Dims[1] = {-1}; | |||
| 9577 | const int y_Rank = 1; | |||
| 9578 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 9579 | int capi_y_intent = 0; | |||
| 9580 | int capi_overwrite_y = 0; | |||
| 9581 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 9582 | int incy = 0; | |||
| 9583 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 9584 | int offy = 0; | |||
| 9585 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 9586 | int lower = 0; | |||
| 9587 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 9588 | int ly = 0; | |||
| 9589 | static char *capi_kwlist[] = {"k","alpha","a","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 9590 | ||||
| 9591 | /*routdebugenter*/ | |||
| 9592 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9593 | f2py_start_clock(); | |||
| 9594 | #endif | |||
| 9595 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 9596 | "OOOO|OOOOOOOi:_fblas.dsbmv",\ | |||
| 9597 | capi_kwlist,&k_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 9598 | return NULL((void*)0); | |||
| 9599 | /*frompyobj*/ | |||
| 9600 | /* Processing variable lower */ | |||
| 9601 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 9602 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsbmv() 7th keyword (lower) can't be converted to int"); | |||
| 9603 | if (f2py_success) { | |||
| 9604 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","dsbmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsbmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9605 | /* Processing variable incx */ | |||
| 9606 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 9607 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dsbmv() 1st keyword (incx) can't be converted to int"); | |||
| 9608 | if (f2py_success) { | |||
| 9609 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dsbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9610 | /* Processing variable incy */ | |||
| 9611 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 9612 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dsbmv() 5th keyword (incy) can't be converted to int"); | |||
| 9613 | if (f2py_success) { | |||
| 9614 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","dsbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9615 | /* Processing variable offx */ | |||
| 9616 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 9617 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dsbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 9618 | if (f2py_success) { | |||
| 9619 | /* Processing variable offy */ | |||
| 9620 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 9621 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dsbmv() 6th keyword (offy) can't be converted to int"); | |||
| 9622 | if (f2py_success) { | |||
| 9623 | /* Processing variable alpha */ | |||
| 9624 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsbmv() 2nd argument (alpha) can't be converted to double"); | |||
| 9625 | if (f2py_success) { | |||
| 9626 | /* Processing variable beta */ | |||
| 9627 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 9628 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dsbmv() 3rd keyword (beta) can't be converted to double"); | |||
| 9629 | if (f2py_success) { | |||
| 9630 | /* Processing variable a */ | |||
| 9631 | ; | |||
| 9632 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 9633 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 9634 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 9635 | if (!PyErr_Occurred()) | |||
| 9636 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `a' of _fblas.dsbmv to C/Fortran array" ); | |||
| 9637 | } else { | |||
| 9638 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 9639 | ||||
| 9640 | /* Processing variable n */ | |||
| 9641 | n = shape(a,1)a_Dims[1]; | |||
| 9642 | CHECKSCALAR(n>=0,"n>=0","hidden n","dsbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 9643 | /* Processing variable lda */ | |||
| 9644 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 9645 | /* Processing variable k */ | |||
| 9646 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.dsbmv() 1st argument (k) can't be converted to int"); | |||
| 9647 | if (f2py_success) { | |||
| 9648 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","dsbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 9649 | /* Processing variable ly */ | |||
| 9650 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 9651 | /* Processing variable y */ | |||
| 9652 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 9653 | y_Dims[0]=ly; | |||
| 9654 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 9655 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 9656 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 9657 | if (!PyErr_Occurred()) | |||
| 9658 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.dsbmv to C/Fortran array" ); | |||
| 9659 | } else { | |||
| 9660 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 9661 | ||||
| 9662 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 9663 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 9664 | /* Processing variable x */ | |||
| 9665 | ; | |||
| 9666 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 9667 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 9668 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 9669 | if (!PyErr_Occurred()) | |||
| 9670 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.dsbmv to C/Fortran array" ); | |||
| 9671 | } else { | |||
| 9672 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 9673 | ||||
| 9674 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 9675 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 9676 | /*end of frompyobj*/ | |||
| 9677 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9678 | f2py_start_call_clock(); | |||
| 9679 | #endif | |||
| 9680 | /*callfortranroutine*/ | |||
| 9681 | (*f2py_func)((lower?"L":"U"),&n,&k,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 9682 | /*(*f2py_func)(&n,&k,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 9683 | if (PyErr_Occurred()) | |||
| 9684 | f2py_success = 0; | |||
| 9685 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9686 | f2py_stop_call_clock(); | |||
| 9687 | #endif | |||
| 9688 | /*end of callfortranroutine*/ | |||
| 9689 | if (f2py_success) { | |||
| 9690 | /*pyobjfrom*/ | |||
| 9691 | /*end of pyobjfrom*/ | |||
| 9692 | CFUNCSMESS("Building return value.\n"); | |||
| 9693 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 9694 | /*closepyobjfrom*/ | |||
| 9695 | /*end of closepyobjfrom*/ | |||
| 9696 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 9697 | /*cleanupfrompyobj*/ | |||
| 9698 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 9699 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 9700 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 9701 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 9702 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 9703 | /* End of cleaning variable x */ | |||
| 9704 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 9705 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 9706 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 9707 | /* End of cleaning variable y */ | |||
| 9708 | /* End of cleaning variable ly */ | |||
| 9709 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 9710 | } /*if (f2py_success) of k*/ | |||
| 9711 | /* End of cleaning variable k */ | |||
| 9712 | /* End of cleaning variable lda */ | |||
| 9713 | } /*CHECKSCALAR(n>=0)*/ | |||
| 9714 | /* End of cleaning variable n */ | |||
| 9715 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 9716 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 9717 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 9718 | /* End of cleaning variable a */ | |||
| 9719 | } /*if (f2py_success) of beta*/ | |||
| 9720 | /* End of cleaning variable beta */ | |||
| 9721 | } /*if (f2py_success) of alpha*/ | |||
| 9722 | /* End of cleaning variable alpha */ | |||
| 9723 | } /*if (f2py_success) of offy*/ | |||
| 9724 | /* End of cleaning variable offy */ | |||
| 9725 | } /*if (f2py_success) of offx*/ | |||
| 9726 | /* End of cleaning variable offx */ | |||
| 9727 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 9728 | } /*if (f2py_success) of incy*/ | |||
| 9729 | /* End of cleaning variable incy */ | |||
| 9730 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 9731 | } /*if (f2py_success) of incx*/ | |||
| 9732 | /* End of cleaning variable incx */ | |||
| 9733 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 9734 | } /*if (f2py_success) of lower*/ | |||
| 9735 | /* End of cleaning variable lower */ | |||
| 9736 | /*end of cleanupfrompyobj*/ | |||
| 9737 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 9738 | /*routdebugfailure*/ | |||
| 9739 | } else { | |||
| 9740 | /*routdebugleave*/ | |||
| 9741 | } | |||
| 9742 | CFUNCSMESS("Freeing memory.\n"); | |||
| 9743 | /*freemem*/ | |||
| 9744 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9745 | f2py_stop_clock(); | |||
| 9746 | #endif | |||
| 9747 | return capi_buildvalue; | |||
| 9748 | } | |||
| 9749 | /******************************** end of dsbmv ********************************/ | |||
| 9750 | ||||
| 9751 | /*********************************** chbmv ***********************************/ | |||
| 9752 | static char doc_f2py_rout__fblas_chbmv[] = "\ | |||
| 9753 | yout = chbmv(k,alpha,a,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``chbmv``.\ | |||
| 9754 | \n\nParameters\n----------\n" | |||
| 9755 | "k : input int\n" | |||
| 9756 | "alpha : input complex\n" | |||
| 9757 | "a : input rank-2 array('F') with bounds (lda,n)\n" | |||
| 9758 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 9759 | "\nOther Parameters\n----------------\n" | |||
| 9760 | "incx : input int, optional\n Default: 1\n" | |||
| 9761 | "offx : input int, optional\n Default: 0\n" | |||
| 9762 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 9763 | "y : input rank-1 array('F') with bounds (ly)\n" | |||
| 9764 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 9765 | "incy : input int, optional\n Default: 1\n" | |||
| 9766 | "offy : input int, optional\n Default: 0\n" | |||
| 9767 | "lower : input int, optional\n Default: 0\n" | |||
| 9768 | "\nReturns\n-------\n" | |||
| 9769 | "yout : rank-1 array('F') with bounds (ly) and y storage"; | |||
| 9770 | /* extern void F_FUNC(chbmv,CHBMV)(char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 9771 | static PyObject *f2py_rout__fblas_chbmv(const PyObject *capi_self, | |||
| 9772 | PyObject *capi_args, | |||
| 9773 | PyObject *capi_keywds, | |||
| 9774 | void (*f2py_func)(char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 9775 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 9776 | volatile int f2py_success = 1; | |||
| 9777 | /*decl*/ | |||
| 9778 | ||||
| 9779 | int n = 0; | |||
| 9780 | int k = 0; | |||
| 9781 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 9782 | complex_float alpha; | |||
| 9783 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 9784 | complex_float *a = NULL((void*)0); | |||
| 9785 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 9786 | const int a_Rank = 2; | |||
| 9787 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 9788 | int capi_a_intent = 0; | |||
| 9789 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 9790 | int lda = 0; | |||
| 9791 | complex_float *x = NULL((void*)0); | |||
| 9792 | npy_intp x_Dims[1] = {-1}; | |||
| 9793 | const int x_Rank = 1; | |||
| 9794 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 9795 | int capi_x_intent = 0; | |||
| 9796 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 9797 | int incx = 0; | |||
| 9798 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 9799 | int offx = 0; | |||
| 9800 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 9801 | complex_float beta; | |||
| 9802 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 9803 | complex_float *y = NULL((void*)0); | |||
| 9804 | npy_intp y_Dims[1] = {-1}; | |||
| 9805 | const int y_Rank = 1; | |||
| 9806 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 9807 | int capi_y_intent = 0; | |||
| 9808 | int capi_overwrite_y = 0; | |||
| 9809 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 9810 | int incy = 0; | |||
| 9811 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 9812 | int offy = 0; | |||
| 9813 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 9814 | int lower = 0; | |||
| 9815 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 9816 | int ly = 0; | |||
| 9817 | static char *capi_kwlist[] = {"k","alpha","a","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 9818 | ||||
| 9819 | /*routdebugenter*/ | |||
| 9820 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9821 | f2py_start_clock(); | |||
| 9822 | #endif | |||
| 9823 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 9824 | "OOOO|OOOOOOOi:_fblas.chbmv",\ | |||
| 9825 | capi_kwlist,&k_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 9826 | return NULL((void*)0); | |||
| 9827 | /*frompyobj*/ | |||
| 9828 | /* Processing variable lower */ | |||
| 9829 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 9830 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.chbmv() 7th keyword (lower) can't be converted to int"); | |||
| 9831 | if (f2py_success) { | |||
| 9832 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","chbmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chbmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9833 | /* Processing variable incx */ | |||
| 9834 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 9835 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.chbmv() 1st keyword (incx) can't be converted to int"); | |||
| 9836 | if (f2py_success) { | |||
| 9837 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","chbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9838 | /* Processing variable incy */ | |||
| 9839 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 9840 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.chbmv() 5th keyword (incy) can't be converted to int"); | |||
| 9841 | if (f2py_success) { | |||
| 9842 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","chbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 9843 | /* Processing variable offx */ | |||
| 9844 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 9845 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.chbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 9846 | if (f2py_success) { | |||
| 9847 | /* Processing variable offy */ | |||
| 9848 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 9849 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.chbmv() 6th keyword (offy) can't be converted to int"); | |||
| 9850 | if (f2py_success) { | |||
| 9851 | /* Processing variable alpha */ | |||
| 9852 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.chbmv() 2nd argument (alpha) can't be converted to complex_float"); | |||
| 9853 | if (f2py_success) { | |||
| 9854 | /* Processing variable beta */ | |||
| 9855 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 9856 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.chbmv() 3rd keyword (beta) can't be converted to complex_float"); | |||
| 9857 | if (f2py_success) { | |||
| 9858 | /* Processing variable a */ | |||
| 9859 | ; | |||
| 9860 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 9861 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 9862 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 9863 | if (!PyErr_Occurred()) | |||
| 9864 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `a' of _fblas.chbmv to C/Fortran array" ); | |||
| 9865 | } else { | |||
| 9866 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 9867 | ||||
| 9868 | /* Processing variable n */ | |||
| 9869 | n = shape(a,1)a_Dims[1]; | |||
| 9870 | CHECKSCALAR(n>=0,"n>=0","hidden n","chbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 9871 | /* Processing variable lda */ | |||
| 9872 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 9873 | /* Processing variable k */ | |||
| 9874 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.chbmv() 1st argument (k) can't be converted to int"); | |||
| 9875 | if (f2py_success) { | |||
| 9876 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","chbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 9877 | /* Processing variable ly */ | |||
| 9878 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 9879 | /* Processing variable y */ | |||
| 9880 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 9881 | y_Dims[0]=ly; | |||
| 9882 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 9883 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 9884 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 9885 | if (!PyErr_Occurred()) | |||
| 9886 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.chbmv to C/Fortran array" ); | |||
| 9887 | } else { | |||
| 9888 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 9889 | ||||
| 9890 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 9891 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 9892 | /* Processing variable x */ | |||
| 9893 | ; | |||
| 9894 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 9895 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 9896 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 9897 | if (!PyErr_Occurred()) | |||
| 9898 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.chbmv to C/Fortran array" ); | |||
| 9899 | } else { | |||
| 9900 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 9901 | ||||
| 9902 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 9903 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 9904 | /*end of frompyobj*/ | |||
| 9905 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9906 | f2py_start_call_clock(); | |||
| 9907 | #endif | |||
| 9908 | /*callfortranroutine*/ | |||
| 9909 | (*f2py_func)((lower?"L":"U"),&n,&k,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 9910 | /*(*f2py_func)(&n,&k,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 9911 | if (PyErr_Occurred()) | |||
| 9912 | f2py_success = 0; | |||
| 9913 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9914 | f2py_stop_call_clock(); | |||
| 9915 | #endif | |||
| 9916 | /*end of callfortranroutine*/ | |||
| 9917 | if (f2py_success) { | |||
| 9918 | /*pyobjfrom*/ | |||
| 9919 | /*end of pyobjfrom*/ | |||
| 9920 | CFUNCSMESS("Building return value.\n"); | |||
| 9921 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 9922 | /*closepyobjfrom*/ | |||
| 9923 | /*end of closepyobjfrom*/ | |||
| 9924 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 9925 | /*cleanupfrompyobj*/ | |||
| 9926 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 9927 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 9928 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 9929 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 9930 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 9931 | /* End of cleaning variable x */ | |||
| 9932 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 9933 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 9934 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 9935 | /* End of cleaning variable y */ | |||
| 9936 | /* End of cleaning variable ly */ | |||
| 9937 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 9938 | } /*if (f2py_success) of k*/ | |||
| 9939 | /* End of cleaning variable k */ | |||
| 9940 | /* End of cleaning variable lda */ | |||
| 9941 | } /*CHECKSCALAR(n>=0)*/ | |||
| 9942 | /* End of cleaning variable n */ | |||
| 9943 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 9944 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 9945 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 9946 | /* End of cleaning variable a */ | |||
| 9947 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 9948 | /* End of cleaning variable beta */ | |||
| 9949 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 9950 | /* End of cleaning variable alpha */ | |||
| 9951 | } /*if (f2py_success) of offy*/ | |||
| 9952 | /* End of cleaning variable offy */ | |||
| 9953 | } /*if (f2py_success) of offx*/ | |||
| 9954 | /* End of cleaning variable offx */ | |||
| 9955 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 9956 | } /*if (f2py_success) of incy*/ | |||
| 9957 | /* End of cleaning variable incy */ | |||
| 9958 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 9959 | } /*if (f2py_success) of incx*/ | |||
| 9960 | /* End of cleaning variable incx */ | |||
| 9961 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 9962 | } /*if (f2py_success) of lower*/ | |||
| 9963 | /* End of cleaning variable lower */ | |||
| 9964 | /*end of cleanupfrompyobj*/ | |||
| 9965 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 9966 | /*routdebugfailure*/ | |||
| 9967 | } else { | |||
| 9968 | /*routdebugleave*/ | |||
| 9969 | } | |||
| 9970 | CFUNCSMESS("Freeing memory.\n"); | |||
| 9971 | /*freemem*/ | |||
| 9972 | #ifdef F2PY_REPORT_ATEXIT | |||
| 9973 | f2py_stop_clock(); | |||
| 9974 | #endif | |||
| 9975 | return capi_buildvalue; | |||
| 9976 | } | |||
| 9977 | /******************************** end of chbmv ********************************/ | |||
| 9978 | ||||
| 9979 | /*********************************** zhbmv ***********************************/ | |||
| 9980 | static char doc_f2py_rout__fblas_zhbmv[] = "\ | |||
| 9981 | yout = zhbmv(k,alpha,a,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``zhbmv``.\ | |||
| 9982 | \n\nParameters\n----------\n" | |||
| 9983 | "k : input int\n" | |||
| 9984 | "alpha : input complex\n" | |||
| 9985 | "a : input rank-2 array('D') with bounds (lda,n)\n" | |||
| 9986 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 9987 | "\nOther Parameters\n----------------\n" | |||
| 9988 | "incx : input int, optional\n Default: 1\n" | |||
| 9989 | "offx : input int, optional\n Default: 0\n" | |||
| 9990 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 9991 | "y : input rank-1 array('D') with bounds (ly)\n" | |||
| 9992 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 9993 | "incy : input int, optional\n Default: 1\n" | |||
| 9994 | "offy : input int, optional\n Default: 0\n" | |||
| 9995 | "lower : input int, optional\n Default: 0\n" | |||
| 9996 | "\nReturns\n-------\n" | |||
| 9997 | "yout : rank-1 array('D') with bounds (ly) and y storage"; | |||
| 9998 | /* extern void F_FUNC(zhbmv,ZHBMV)(char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 9999 | static PyObject *f2py_rout__fblas_zhbmv(const PyObject *capi_self, | |||
| 10000 | PyObject *capi_args, | |||
| 10001 | PyObject *capi_keywds, | |||
| 10002 | void (*f2py_func)(char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 10003 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 10004 | volatile int f2py_success = 1; | |||
| 10005 | /*decl*/ | |||
| 10006 | ||||
| 10007 | int n = 0; | |||
| 10008 | int k = 0; | |||
| 10009 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 10010 | complex_double alpha; | |||
| 10011 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 10012 | complex_double *a = NULL((void*)0); | |||
| 10013 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 10014 | const int a_Rank = 2; | |||
| 10015 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 10016 | int capi_a_intent = 0; | |||
| 10017 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 10018 | int lda = 0; | |||
| 10019 | complex_double *x = NULL((void*)0); | |||
| 10020 | npy_intp x_Dims[1] = {-1}; | |||
| 10021 | const int x_Rank = 1; | |||
| 10022 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 10023 | int capi_x_intent = 0; | |||
| 10024 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 10025 | int incx = 0; | |||
| 10026 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 10027 | int offx = 0; | |||
| 10028 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 10029 | complex_double beta; | |||
| 10030 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 10031 | complex_double *y = NULL((void*)0); | |||
| 10032 | npy_intp y_Dims[1] = {-1}; | |||
| 10033 | const int y_Rank = 1; | |||
| 10034 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 10035 | int capi_y_intent = 0; | |||
| 10036 | int capi_overwrite_y = 0; | |||
| 10037 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 10038 | int incy = 0; | |||
| 10039 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 10040 | int offy = 0; | |||
| 10041 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 10042 | int lower = 0; | |||
| 10043 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 10044 | int ly = 0; | |||
| 10045 | static char *capi_kwlist[] = {"k","alpha","a","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 10046 | ||||
| 10047 | /*routdebugenter*/ | |||
| 10048 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10049 | f2py_start_clock(); | |||
| 10050 | #endif | |||
| 10051 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 10052 | "OOOO|OOOOOOOi:_fblas.zhbmv",\ | |||
| 10053 | capi_kwlist,&k_capi,&alpha_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 10054 | return NULL((void*)0); | |||
| 10055 | /*frompyobj*/ | |||
| 10056 | /* Processing variable lower */ | |||
| 10057 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 10058 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zhbmv() 7th keyword (lower) can't be converted to int"); | |||
| 10059 | if (f2py_success) { | |||
| 10060 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","zhbmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhbmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10061 | /* Processing variable incx */ | |||
| 10062 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 10063 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zhbmv() 1st keyword (incx) can't be converted to int"); | |||
| 10064 | if (f2py_success) { | |||
| 10065 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zhbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10066 | /* Processing variable incy */ | |||
| 10067 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 10068 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zhbmv() 5th keyword (incy) can't be converted to int"); | |||
| 10069 | if (f2py_success) { | |||
| 10070 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zhbmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhbmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10071 | /* Processing variable offx */ | |||
| 10072 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 10073 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zhbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 10074 | if (f2py_success) { | |||
| 10075 | /* Processing variable offy */ | |||
| 10076 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 10077 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zhbmv() 6th keyword (offy) can't be converted to int"); | |||
| 10078 | if (f2py_success) { | |||
| 10079 | /* Processing variable alpha */ | |||
| 10080 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zhbmv() 2nd argument (alpha) can't be converted to complex_double"); | |||
| 10081 | if (f2py_success) { | |||
| 10082 | /* Processing variable beta */ | |||
| 10083 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 10084 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zhbmv() 3rd keyword (beta) can't be converted to complex_double"); | |||
| 10085 | if (f2py_success) { | |||
| 10086 | /* Processing variable a */ | |||
| 10087 | ; | |||
| 10088 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 10089 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 10090 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 10091 | if (!PyErr_Occurred()) | |||
| 10092 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `a' of _fblas.zhbmv to C/Fortran array" ); | |||
| 10093 | } else { | |||
| 10094 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 10095 | ||||
| 10096 | /* Processing variable n */ | |||
| 10097 | n = shape(a,1)a_Dims[1]; | |||
| 10098 | CHECKSCALAR(n>=0,"n>=0","hidden n","zhbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 10099 | /* Processing variable lda */ | |||
| 10100 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 10101 | /* Processing variable k */ | |||
| 10102 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.zhbmv() 1st argument (k) can't be converted to int"); | |||
| 10103 | if (f2py_success) { | |||
| 10104 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","zhbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 10105 | /* Processing variable ly */ | |||
| 10106 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 10107 | /* Processing variable y */ | |||
| 10108 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 10109 | y_Dims[0]=ly; | |||
| 10110 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 10111 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 10112 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 10113 | if (!PyErr_Occurred()) | |||
| 10114 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.zhbmv to C/Fortran array" ); | |||
| 10115 | } else { | |||
| 10116 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 10117 | ||||
| 10118 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 10119 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 10120 | /* Processing variable x */ | |||
| 10121 | ; | |||
| 10122 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 10123 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 10124 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 10125 | if (!PyErr_Occurred()) | |||
| 10126 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.zhbmv to C/Fortran array" ); | |||
| 10127 | } else { | |||
| 10128 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 10129 | ||||
| 10130 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 10131 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 10132 | /*end of frompyobj*/ | |||
| 10133 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10134 | f2py_start_call_clock(); | |||
| 10135 | #endif | |||
| 10136 | /*callfortranroutine*/ | |||
| 10137 | (*f2py_func)((lower?"L":"U"),&n,&k,&alpha,a,&lda,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 10138 | /*(*f2py_func)(&n,&k,&alpha,a,&lda,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 10139 | if (PyErr_Occurred()) | |||
| 10140 | f2py_success = 0; | |||
| 10141 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10142 | f2py_stop_call_clock(); | |||
| 10143 | #endif | |||
| 10144 | /*end of callfortranroutine*/ | |||
| 10145 | if (f2py_success) { | |||
| 10146 | /*pyobjfrom*/ | |||
| 10147 | /*end of pyobjfrom*/ | |||
| 10148 | CFUNCSMESS("Building return value.\n"); | |||
| 10149 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 10150 | /*closepyobjfrom*/ | |||
| 10151 | /*end of closepyobjfrom*/ | |||
| 10152 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 10153 | /*cleanupfrompyobj*/ | |||
| 10154 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 10155 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 10156 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 10157 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 10158 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 10159 | /* End of cleaning variable x */ | |||
| 10160 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 10161 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 10162 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 10163 | /* End of cleaning variable y */ | |||
| 10164 | /* End of cleaning variable ly */ | |||
| 10165 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 10166 | } /*if (f2py_success) of k*/ | |||
| 10167 | /* End of cleaning variable k */ | |||
| 10168 | /* End of cleaning variable lda */ | |||
| 10169 | } /*CHECKSCALAR(n>=0)*/ | |||
| 10170 | /* End of cleaning variable n */ | |||
| 10171 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 10172 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 10173 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 10174 | /* End of cleaning variable a */ | |||
| 10175 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 10176 | /* End of cleaning variable beta */ | |||
| 10177 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 10178 | /* End of cleaning variable alpha */ | |||
| 10179 | } /*if (f2py_success) of offy*/ | |||
| 10180 | /* End of cleaning variable offy */ | |||
| 10181 | } /*if (f2py_success) of offx*/ | |||
| 10182 | /* End of cleaning variable offx */ | |||
| 10183 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 10184 | } /*if (f2py_success) of incy*/ | |||
| 10185 | /* End of cleaning variable incy */ | |||
| 10186 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 10187 | } /*if (f2py_success) of incx*/ | |||
| 10188 | /* End of cleaning variable incx */ | |||
| 10189 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 10190 | } /*if (f2py_success) of lower*/ | |||
| 10191 | /* End of cleaning variable lower */ | |||
| 10192 | /*end of cleanupfrompyobj*/ | |||
| 10193 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 10194 | /*routdebugfailure*/ | |||
| 10195 | } else { | |||
| 10196 | /*routdebugleave*/ | |||
| 10197 | } | |||
| 10198 | CFUNCSMESS("Freeing memory.\n"); | |||
| 10199 | /*freemem*/ | |||
| 10200 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10201 | f2py_stop_clock(); | |||
| 10202 | #endif | |||
| 10203 | return capi_buildvalue; | |||
| 10204 | } | |||
| 10205 | /******************************** end of zhbmv ********************************/ | |||
| 10206 | ||||
| 10207 | /*********************************** sspmv ***********************************/ | |||
| 10208 | static char doc_f2py_rout__fblas_sspmv[] = "\ | |||
| 10209 | yout = sspmv(n,alpha,ap,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``sspmv``.\ | |||
| 10210 | \n\nParameters\n----------\n" | |||
| 10211 | "n : input int\n" | |||
| 10212 | "alpha : input float\n" | |||
| 10213 | "ap : input rank-1 array('f') with bounds (*)\n" | |||
| 10214 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 10215 | "\nOther Parameters\n----------------\n" | |||
| 10216 | "incx : input int, optional\n Default: 1\n" | |||
| 10217 | "offx : input int, optional\n Default: 0\n" | |||
| 10218 | "beta : input float, optional\n Default: 0.0\n" | |||
| 10219 | "y : input rank-1 array('f') with bounds (ly)\n" | |||
| 10220 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 10221 | "incy : input int, optional\n Default: 1\n" | |||
| 10222 | "offy : input int, optional\n Default: 0\n" | |||
| 10223 | "lower : input int, optional\n Default: 0\n" | |||
| 10224 | "\nReturns\n-------\n" | |||
| 10225 | "yout : rank-1 array('f') with bounds (ly) and y storage"; | |||
| 10226 | /* extern void F_FUNC(sspmv,SSPMV)(char*,F_INT*,float*,float*,float*,F_INT*,float*,float*,F_INT* ); */ | |||
| 10227 | static PyObject *f2py_rout__fblas_sspmv(const PyObject *capi_self, | |||
| 10228 | PyObject *capi_args, | |||
| 10229 | PyObject *capi_keywds, | |||
| 10230 | void (*f2py_func)(char*,F_INTint*,float*,float*,float*,F_INTint*,float*,float*,F_INTint* )) { | |||
| 10231 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 10232 | volatile int f2py_success = 1; | |||
| 10233 | /*decl*/ | |||
| 10234 | ||||
| 10235 | int n = 0; | |||
| 10236 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 10237 | float alpha = 0; | |||
| 10238 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 10239 | float *ap = NULL((void*)0); | |||
| 10240 | npy_intp ap_Dims[1] = {-1}; | |||
| 10241 | const int ap_Rank = 1; | |||
| 10242 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 10243 | int capi_ap_intent = 0; | |||
| 10244 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 10245 | float *x = NULL((void*)0); | |||
| 10246 | npy_intp x_Dims[1] = {-1}; | |||
| 10247 | const int x_Rank = 1; | |||
| 10248 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 10249 | int capi_x_intent = 0; | |||
| 10250 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 10251 | int incx = 0; | |||
| 10252 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 10253 | int offx = 0; | |||
| 10254 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 10255 | float beta = 0; | |||
| 10256 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 10257 | float *y = NULL((void*)0); | |||
| 10258 | npy_intp y_Dims[1] = {-1}; | |||
| 10259 | const int y_Rank = 1; | |||
| 10260 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 10261 | int capi_y_intent = 0; | |||
| 10262 | int capi_overwrite_y = 0; | |||
| 10263 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 10264 | int incy = 0; | |||
| 10265 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 10266 | int offy = 0; | |||
| 10267 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 10268 | int lower = 0; | |||
| 10269 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 10270 | int ly = 0; | |||
| 10271 | static char *capi_kwlist[] = {"n","alpha","ap","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 10272 | ||||
| 10273 | /*routdebugenter*/ | |||
| 10274 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10275 | f2py_start_clock(); | |||
| 10276 | #endif | |||
| 10277 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 10278 | "OOOO|OOOOOOOi:_fblas.sspmv",\ | |||
| 10279 | capi_kwlist,&n_capi,&alpha_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 10280 | return NULL((void*)0); | |||
| 10281 | /*frompyobj*/ | |||
| 10282 | /* Processing variable lower */ | |||
| 10283 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 10284 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.sspmv() 7th keyword (lower) can't be converted to int"); | |||
| 10285 | if (f2py_success) { | |||
| 10286 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","sspmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10287 | /* Processing variable n */ | |||
| 10288 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sspmv() 1st argument (n) can't be converted to int"); | |||
| 10289 | if (f2py_success) { | |||
| 10290 | CHECKSCALAR(n>=0,"n>=0","1st argument n","sspmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 10291 | /* Processing variable incx */ | |||
| 10292 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 10293 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sspmv() 1st keyword (incx) can't be converted to int"); | |||
| 10294 | if (f2py_success) { | |||
| 10295 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","sspmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10296 | /* Processing variable incy */ | |||
| 10297 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 10298 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sspmv() 5th keyword (incy) can't be converted to int"); | |||
| 10299 | if (f2py_success) { | |||
| 10300 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","sspmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10301 | /* Processing variable offx */ | |||
| 10302 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 10303 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sspmv() 2nd keyword (offx) can't be converted to int"); | |||
| 10304 | if (f2py_success) { | |||
| 10305 | /* Processing variable offy */ | |||
| 10306 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 10307 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.sspmv() 6th keyword (offy) can't be converted to int"); | |||
| 10308 | if (f2py_success) { | |||
| 10309 | /* Processing variable alpha */ | |||
| 10310 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sspmv() 2nd argument (alpha) can't be converted to float"); | |||
| 10311 | if (f2py_success) { | |||
| 10312 | /* Processing variable beta */ | |||
| 10313 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 10314 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.sspmv() 3rd keyword (beta) can't be converted to float"); | |||
| 10315 | if (f2py_success) { | |||
| 10316 | /* Processing variable ly */ | |||
| 10317 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 10318 | /* Processing variable ap */ | |||
| 10319 | ; | |||
| 10320 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 10321 | capi_ap_tmp = array_from_pyobj(NPY_FLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 10322 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 10323 | if (!PyErr_Occurred()) | |||
| 10324 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `ap' of _fblas.sspmv to C/Fortran array" ); | |||
| 10325 | } else { | |||
| 10326 | ap = (float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 10327 | ||||
| 10328 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","3rd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""3rd argument ap" ); } else { | |||
| 10329 | /* Processing variable y */ | |||
| 10330 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 10331 | y_Dims[0]=ly; | |||
| 10332 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 10333 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 10334 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 10335 | if (!PyErr_Occurred()) | |||
| 10336 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.sspmv to C/Fortran array" ); | |||
| 10337 | } else { | |||
| 10338 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 10339 | ||||
| 10340 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 10341 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 10342 | /* Processing variable x */ | |||
| 10343 | ; | |||
| 10344 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 10345 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 10346 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 10347 | if (!PyErr_Occurred()) | |||
| 10348 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.sspmv to C/Fortran array" ); | |||
| 10349 | } else { | |||
| 10350 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 10351 | ||||
| 10352 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 10353 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 10354 | /*end of frompyobj*/ | |||
| 10355 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10356 | f2py_start_call_clock(); | |||
| 10357 | #endif | |||
| 10358 | /*callfortranroutine*/ | |||
| 10359 | (*f2py_func)((lower?"L":"U"),&n,&alpha,ap,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 10360 | /*(*f2py_func)(&n,&alpha,ap,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 10361 | if (PyErr_Occurred()) | |||
| 10362 | f2py_success = 0; | |||
| 10363 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10364 | f2py_stop_call_clock(); | |||
| 10365 | #endif | |||
| 10366 | /*end of callfortranroutine*/ | |||
| 10367 | if (f2py_success) { | |||
| 10368 | /*pyobjfrom*/ | |||
| 10369 | /*end of pyobjfrom*/ | |||
| 10370 | CFUNCSMESS("Building return value.\n"); | |||
| 10371 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 10372 | /*closepyobjfrom*/ | |||
| 10373 | /*end of closepyobjfrom*/ | |||
| 10374 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 10375 | /*cleanupfrompyobj*/ | |||
| 10376 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 10377 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 10378 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 10379 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 10380 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 10381 | /* End of cleaning variable x */ | |||
| 10382 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 10383 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 10384 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 10385 | /* End of cleaning variable y */ | |||
| 10386 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 10387 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 10388 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 10389 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 10390 | /* End of cleaning variable ap */ | |||
| 10391 | /* End of cleaning variable ly */ | |||
| 10392 | } /*if (f2py_success) of beta*/ | |||
| 10393 | /* End of cleaning variable beta */ | |||
| 10394 | } /*if (f2py_success) of alpha*/ | |||
| 10395 | /* End of cleaning variable alpha */ | |||
| 10396 | } /*if (f2py_success) of offy*/ | |||
| 10397 | /* End of cleaning variable offy */ | |||
| 10398 | } /*if (f2py_success) of offx*/ | |||
| 10399 | /* End of cleaning variable offx */ | |||
| 10400 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 10401 | } /*if (f2py_success) of incy*/ | |||
| 10402 | /* End of cleaning variable incy */ | |||
| 10403 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 10404 | } /*if (f2py_success) of incx*/ | |||
| 10405 | /* End of cleaning variable incx */ | |||
| 10406 | } /*CHECKSCALAR(n>=0)*/ | |||
| 10407 | } /*if (f2py_success) of n*/ | |||
| 10408 | /* End of cleaning variable n */ | |||
| 10409 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 10410 | } /*if (f2py_success) of lower*/ | |||
| 10411 | /* End of cleaning variable lower */ | |||
| 10412 | /*end of cleanupfrompyobj*/ | |||
| 10413 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 10414 | /*routdebugfailure*/ | |||
| 10415 | } else { | |||
| 10416 | /*routdebugleave*/ | |||
| 10417 | } | |||
| 10418 | CFUNCSMESS("Freeing memory.\n"); | |||
| 10419 | /*freemem*/ | |||
| 10420 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10421 | f2py_stop_clock(); | |||
| 10422 | #endif | |||
| 10423 | return capi_buildvalue; | |||
| 10424 | } | |||
| 10425 | /******************************** end of sspmv ********************************/ | |||
| 10426 | ||||
| 10427 | /*********************************** dspmv ***********************************/ | |||
| 10428 | static char doc_f2py_rout__fblas_dspmv[] = "\ | |||
| 10429 | yout = dspmv(n,alpha,ap,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``dspmv``.\ | |||
| 10430 | \n\nParameters\n----------\n" | |||
| 10431 | "n : input int\n" | |||
| 10432 | "alpha : input float\n" | |||
| 10433 | "ap : input rank-1 array('d') with bounds (*)\n" | |||
| 10434 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 10435 | "\nOther Parameters\n----------------\n" | |||
| 10436 | "incx : input int, optional\n Default: 1\n" | |||
| 10437 | "offx : input int, optional\n Default: 0\n" | |||
| 10438 | "beta : input float, optional\n Default: 0.0\n" | |||
| 10439 | "y : input rank-1 array('d') with bounds (ly)\n" | |||
| 10440 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 10441 | "incy : input int, optional\n Default: 1\n" | |||
| 10442 | "offy : input int, optional\n Default: 0\n" | |||
| 10443 | "lower : input int, optional\n Default: 0\n" | |||
| 10444 | "\nReturns\n-------\n" | |||
| 10445 | "yout : rank-1 array('d') with bounds (ly) and y storage"; | |||
| 10446 | /* extern void F_FUNC(dspmv,DSPMV)(char*,F_INT*,double*,double*,double*,F_INT*,double*,double*,F_INT* ); */ | |||
| 10447 | static PyObject *f2py_rout__fblas_dspmv(const PyObject *capi_self, | |||
| 10448 | PyObject *capi_args, | |||
| 10449 | PyObject *capi_keywds, | |||
| 10450 | void (*f2py_func)(char*,F_INTint*,double*,double*,double*,F_INTint*,double*,double*,F_INTint* )) { | |||
| 10451 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 10452 | volatile int f2py_success = 1; | |||
| 10453 | /*decl*/ | |||
| 10454 | ||||
| 10455 | int n = 0; | |||
| 10456 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 10457 | double alpha = 0; | |||
| 10458 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 10459 | double *ap = NULL((void*)0); | |||
| 10460 | npy_intp ap_Dims[1] = {-1}; | |||
| 10461 | const int ap_Rank = 1; | |||
| 10462 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 10463 | int capi_ap_intent = 0; | |||
| 10464 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 10465 | double *x = NULL((void*)0); | |||
| 10466 | npy_intp x_Dims[1] = {-1}; | |||
| 10467 | const int x_Rank = 1; | |||
| 10468 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 10469 | int capi_x_intent = 0; | |||
| 10470 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 10471 | int incx = 0; | |||
| 10472 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 10473 | int offx = 0; | |||
| 10474 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 10475 | double beta = 0; | |||
| 10476 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 10477 | double *y = NULL((void*)0); | |||
| 10478 | npy_intp y_Dims[1] = {-1}; | |||
| 10479 | const int y_Rank = 1; | |||
| 10480 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 10481 | int capi_y_intent = 0; | |||
| 10482 | int capi_overwrite_y = 0; | |||
| 10483 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 10484 | int incy = 0; | |||
| 10485 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 10486 | int offy = 0; | |||
| 10487 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 10488 | int lower = 0; | |||
| 10489 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 10490 | int ly = 0; | |||
| 10491 | static char *capi_kwlist[] = {"n","alpha","ap","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 10492 | ||||
| 10493 | /*routdebugenter*/ | |||
| 10494 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10495 | f2py_start_clock(); | |||
| 10496 | #endif | |||
| 10497 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 10498 | "OOOO|OOOOOOOi:_fblas.dspmv",\ | |||
| 10499 | capi_kwlist,&n_capi,&alpha_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 10500 | return NULL((void*)0); | |||
| 10501 | /*frompyobj*/ | |||
| 10502 | /* Processing variable lower */ | |||
| 10503 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 10504 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dspmv() 7th keyword (lower) can't be converted to int"); | |||
| 10505 | if (f2py_success) { | |||
| 10506 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","dspmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10507 | /* Processing variable n */ | |||
| 10508 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dspmv() 1st argument (n) can't be converted to int"); | |||
| 10509 | if (f2py_success) { | |||
| 10510 | CHECKSCALAR(n>=0,"n>=0","1st argument n","dspmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 10511 | /* Processing variable incx */ | |||
| 10512 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 10513 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dspmv() 1st keyword (incx) can't be converted to int"); | |||
| 10514 | if (f2py_success) { | |||
| 10515 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dspmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10516 | /* Processing variable incy */ | |||
| 10517 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 10518 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dspmv() 5th keyword (incy) can't be converted to int"); | |||
| 10519 | if (f2py_success) { | |||
| 10520 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","dspmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10521 | /* Processing variable offx */ | |||
| 10522 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 10523 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dspmv() 2nd keyword (offx) can't be converted to int"); | |||
| 10524 | if (f2py_success) { | |||
| 10525 | /* Processing variable offy */ | |||
| 10526 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 10527 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dspmv() 6th keyword (offy) can't be converted to int"); | |||
| 10528 | if (f2py_success) { | |||
| 10529 | /* Processing variable alpha */ | |||
| 10530 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dspmv() 2nd argument (alpha) can't be converted to double"); | |||
| 10531 | if (f2py_success) { | |||
| 10532 | /* Processing variable beta */ | |||
| 10533 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 10534 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dspmv() 3rd keyword (beta) can't be converted to double"); | |||
| 10535 | if (f2py_success) { | |||
| 10536 | /* Processing variable ly */ | |||
| 10537 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 10538 | /* Processing variable ap */ | |||
| 10539 | ; | |||
| 10540 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 10541 | capi_ap_tmp = array_from_pyobj(NPY_DOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 10542 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 10543 | if (!PyErr_Occurred()) | |||
| 10544 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `ap' of _fblas.dspmv to C/Fortran array" ); | |||
| 10545 | } else { | |||
| 10546 | ap = (double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 10547 | ||||
| 10548 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","3rd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""3rd argument ap" ); } else { | |||
| 10549 | /* Processing variable y */ | |||
| 10550 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 10551 | y_Dims[0]=ly; | |||
| 10552 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 10553 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 10554 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 10555 | if (!PyErr_Occurred()) | |||
| 10556 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.dspmv to C/Fortran array" ); | |||
| 10557 | } else { | |||
| 10558 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 10559 | ||||
| 10560 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 10561 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 10562 | /* Processing variable x */ | |||
| 10563 | ; | |||
| 10564 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 10565 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 10566 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 10567 | if (!PyErr_Occurred()) | |||
| 10568 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.dspmv to C/Fortran array" ); | |||
| 10569 | } else { | |||
| 10570 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 10571 | ||||
| 10572 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 10573 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 10574 | /*end of frompyobj*/ | |||
| 10575 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10576 | f2py_start_call_clock(); | |||
| 10577 | #endif | |||
| 10578 | /*callfortranroutine*/ | |||
| 10579 | (*f2py_func)((lower?"L":"U"),&n,&alpha,ap,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 10580 | /*(*f2py_func)(&n,&alpha,ap,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 10581 | if (PyErr_Occurred()) | |||
| 10582 | f2py_success = 0; | |||
| 10583 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10584 | f2py_stop_call_clock(); | |||
| 10585 | #endif | |||
| 10586 | /*end of callfortranroutine*/ | |||
| 10587 | if (f2py_success) { | |||
| 10588 | /*pyobjfrom*/ | |||
| 10589 | /*end of pyobjfrom*/ | |||
| 10590 | CFUNCSMESS("Building return value.\n"); | |||
| 10591 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 10592 | /*closepyobjfrom*/ | |||
| 10593 | /*end of closepyobjfrom*/ | |||
| 10594 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 10595 | /*cleanupfrompyobj*/ | |||
| 10596 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 10597 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 10598 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 10599 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 10600 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 10601 | /* End of cleaning variable x */ | |||
| 10602 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 10603 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 10604 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 10605 | /* End of cleaning variable y */ | |||
| 10606 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 10607 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 10608 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 10609 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 10610 | /* End of cleaning variable ap */ | |||
| 10611 | /* End of cleaning variable ly */ | |||
| 10612 | } /*if (f2py_success) of beta*/ | |||
| 10613 | /* End of cleaning variable beta */ | |||
| 10614 | } /*if (f2py_success) of alpha*/ | |||
| 10615 | /* End of cleaning variable alpha */ | |||
| 10616 | } /*if (f2py_success) of offy*/ | |||
| 10617 | /* End of cleaning variable offy */ | |||
| 10618 | } /*if (f2py_success) of offx*/ | |||
| 10619 | /* End of cleaning variable offx */ | |||
| 10620 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 10621 | } /*if (f2py_success) of incy*/ | |||
| 10622 | /* End of cleaning variable incy */ | |||
| 10623 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 10624 | } /*if (f2py_success) of incx*/ | |||
| 10625 | /* End of cleaning variable incx */ | |||
| 10626 | } /*CHECKSCALAR(n>=0)*/ | |||
| 10627 | } /*if (f2py_success) of n*/ | |||
| 10628 | /* End of cleaning variable n */ | |||
| 10629 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 10630 | } /*if (f2py_success) of lower*/ | |||
| 10631 | /* End of cleaning variable lower */ | |||
| 10632 | /*end of cleanupfrompyobj*/ | |||
| 10633 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 10634 | /*routdebugfailure*/ | |||
| 10635 | } else { | |||
| 10636 | /*routdebugleave*/ | |||
| 10637 | } | |||
| 10638 | CFUNCSMESS("Freeing memory.\n"); | |||
| 10639 | /*freemem*/ | |||
| 10640 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10641 | f2py_stop_clock(); | |||
| 10642 | #endif | |||
| 10643 | return capi_buildvalue; | |||
| 10644 | } | |||
| 10645 | /******************************** end of dspmv ********************************/ | |||
| 10646 | ||||
| 10647 | /*********************************** cspmv ***********************************/ | |||
| 10648 | static char doc_f2py_rout__fblas_cspmv[] = "\ | |||
| 10649 | yout = cspmv(n,alpha,ap,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``cspmv``.\ | |||
| 10650 | \n\nParameters\n----------\n" | |||
| 10651 | "n : input int\n" | |||
| 10652 | "alpha : input complex\n" | |||
| 10653 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 10654 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 10655 | "\nOther Parameters\n----------------\n" | |||
| 10656 | "incx : input int, optional\n Default: 1\n" | |||
| 10657 | "offx : input int, optional\n Default: 0\n" | |||
| 10658 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 10659 | "y : input rank-1 array('F') with bounds (ly)\n" | |||
| 10660 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 10661 | "incy : input int, optional\n Default: 1\n" | |||
| 10662 | "offy : input int, optional\n Default: 0\n" | |||
| 10663 | "lower : input int, optional\n Default: 0\n" | |||
| 10664 | "\nReturns\n-------\n" | |||
| 10665 | "yout : rank-1 array('F') with bounds (ly) and y storage"; | |||
| 10666 | /* extern void F_FUNC(cspmv,CSPMV)(char*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 10667 | static PyObject *f2py_rout__fblas_cspmv(const PyObject *capi_self, | |||
| 10668 | PyObject *capi_args, | |||
| 10669 | PyObject *capi_keywds, | |||
| 10670 | void (*f2py_func)(char*,F_INTint*,complex_float*,complex_float*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 10671 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 10672 | volatile int f2py_success = 1; | |||
| 10673 | /*decl*/ | |||
| 10674 | ||||
| 10675 | int n = 0; | |||
| 10676 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 10677 | complex_float alpha; | |||
| 10678 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 10679 | complex_float *ap = NULL((void*)0); | |||
| 10680 | npy_intp ap_Dims[1] = {-1}; | |||
| 10681 | const int ap_Rank = 1; | |||
| 10682 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 10683 | int capi_ap_intent = 0; | |||
| 10684 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 10685 | complex_float *x = NULL((void*)0); | |||
| 10686 | npy_intp x_Dims[1] = {-1}; | |||
| 10687 | const int x_Rank = 1; | |||
| 10688 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 10689 | int capi_x_intent = 0; | |||
| 10690 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 10691 | int incx = 0; | |||
| 10692 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 10693 | int offx = 0; | |||
| 10694 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 10695 | complex_float beta; | |||
| 10696 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 10697 | complex_float *y = NULL((void*)0); | |||
| 10698 | npy_intp y_Dims[1] = {-1}; | |||
| 10699 | const int y_Rank = 1; | |||
| 10700 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 10701 | int capi_y_intent = 0; | |||
| 10702 | int capi_overwrite_y = 0; | |||
| 10703 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 10704 | int incy = 0; | |||
| 10705 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 10706 | int offy = 0; | |||
| 10707 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 10708 | int lower = 0; | |||
| 10709 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 10710 | int ly = 0; | |||
| 10711 | static char *capi_kwlist[] = {"n","alpha","ap","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 10712 | ||||
| 10713 | /*routdebugenter*/ | |||
| 10714 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10715 | f2py_start_clock(); | |||
| 10716 | #endif | |||
| 10717 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 10718 | "OOOO|OOOOOOOi:_fblas.cspmv",\ | |||
| 10719 | capi_kwlist,&n_capi,&alpha_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 10720 | return NULL((void*)0); | |||
| 10721 | /*frompyobj*/ | |||
| 10722 | /* Processing variable lower */ | |||
| 10723 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 10724 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.cspmv() 7th keyword (lower) can't be converted to int"); | |||
| 10725 | if (f2py_success) { | |||
| 10726 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","cspmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10727 | /* Processing variable n */ | |||
| 10728 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cspmv() 1st argument (n) can't be converted to int"); | |||
| 10729 | if (f2py_success) { | |||
| 10730 | CHECKSCALAR(n>=0,"n>=0","1st argument n","cspmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 10731 | /* Processing variable incx */ | |||
| 10732 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 10733 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cspmv() 1st keyword (incx) can't be converted to int"); | |||
| 10734 | if (f2py_success) { | |||
| 10735 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","cspmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10736 | /* Processing variable incy */ | |||
| 10737 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 10738 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cspmv() 5th keyword (incy) can't be converted to int"); | |||
| 10739 | if (f2py_success) { | |||
| 10740 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","cspmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10741 | /* Processing variable offx */ | |||
| 10742 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 10743 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cspmv() 2nd keyword (offx) can't be converted to int"); | |||
| 10744 | if (f2py_success) { | |||
| 10745 | /* Processing variable offy */ | |||
| 10746 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 10747 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cspmv() 6th keyword (offy) can't be converted to int"); | |||
| 10748 | if (f2py_success) { | |||
| 10749 | /* Processing variable alpha */ | |||
| 10750 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cspmv() 2nd argument (alpha) can't be converted to complex_float"); | |||
| 10751 | if (f2py_success) { | |||
| 10752 | /* Processing variable beta */ | |||
| 10753 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 10754 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.cspmv() 3rd keyword (beta) can't be converted to complex_float"); | |||
| 10755 | if (f2py_success) { | |||
| 10756 | /* Processing variable ly */ | |||
| 10757 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 10758 | /* Processing variable ap */ | |||
| 10759 | ; | |||
| 10760 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 10761 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 10762 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 10763 | if (!PyErr_Occurred()) | |||
| 10764 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `ap' of _fblas.cspmv to C/Fortran array" ); | |||
| 10765 | } else { | |||
| 10766 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 10767 | ||||
| 10768 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","3rd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""3rd argument ap" ); } else { | |||
| 10769 | /* Processing variable y */ | |||
| 10770 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 10771 | y_Dims[0]=ly; | |||
| 10772 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 10773 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 10774 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 10775 | if (!PyErr_Occurred()) | |||
| 10776 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.cspmv to C/Fortran array" ); | |||
| 10777 | } else { | |||
| 10778 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 10779 | ||||
| 10780 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 10781 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 10782 | /* Processing variable x */ | |||
| 10783 | ; | |||
| 10784 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 10785 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 10786 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 10787 | if (!PyErr_Occurred()) | |||
| 10788 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.cspmv to C/Fortran array" ); | |||
| 10789 | } else { | |||
| 10790 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 10791 | ||||
| 10792 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 10793 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 10794 | /*end of frompyobj*/ | |||
| 10795 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10796 | f2py_start_call_clock(); | |||
| 10797 | #endif | |||
| 10798 | /*callfortranroutine*/ | |||
| 10799 | (*f2py_func)((lower?"L":"U"),&n,&alpha,ap,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 10800 | /*(*f2py_func)(&n,&alpha,ap,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 10801 | if (PyErr_Occurred()) | |||
| 10802 | f2py_success = 0; | |||
| 10803 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10804 | f2py_stop_call_clock(); | |||
| 10805 | #endif | |||
| 10806 | /*end of callfortranroutine*/ | |||
| 10807 | if (f2py_success) { | |||
| 10808 | /*pyobjfrom*/ | |||
| 10809 | /*end of pyobjfrom*/ | |||
| 10810 | CFUNCSMESS("Building return value.\n"); | |||
| 10811 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 10812 | /*closepyobjfrom*/ | |||
| 10813 | /*end of closepyobjfrom*/ | |||
| 10814 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 10815 | /*cleanupfrompyobj*/ | |||
| 10816 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 10817 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 10818 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 10819 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 10820 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 10821 | /* End of cleaning variable x */ | |||
| 10822 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 10823 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 10824 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 10825 | /* End of cleaning variable y */ | |||
| 10826 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 10827 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 10828 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 10829 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 10830 | /* End of cleaning variable ap */ | |||
| 10831 | /* End of cleaning variable ly */ | |||
| 10832 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 10833 | /* End of cleaning variable beta */ | |||
| 10834 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 10835 | /* End of cleaning variable alpha */ | |||
| 10836 | } /*if (f2py_success) of offy*/ | |||
| 10837 | /* End of cleaning variable offy */ | |||
| 10838 | } /*if (f2py_success) of offx*/ | |||
| 10839 | /* End of cleaning variable offx */ | |||
| 10840 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 10841 | } /*if (f2py_success) of incy*/ | |||
| 10842 | /* End of cleaning variable incy */ | |||
| 10843 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 10844 | } /*if (f2py_success) of incx*/ | |||
| 10845 | /* End of cleaning variable incx */ | |||
| 10846 | } /*CHECKSCALAR(n>=0)*/ | |||
| 10847 | } /*if (f2py_success) of n*/ | |||
| 10848 | /* End of cleaning variable n */ | |||
| 10849 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 10850 | } /*if (f2py_success) of lower*/ | |||
| 10851 | /* End of cleaning variable lower */ | |||
| 10852 | /*end of cleanupfrompyobj*/ | |||
| 10853 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 10854 | /*routdebugfailure*/ | |||
| 10855 | } else { | |||
| 10856 | /*routdebugleave*/ | |||
| 10857 | } | |||
| 10858 | CFUNCSMESS("Freeing memory.\n"); | |||
| 10859 | /*freemem*/ | |||
| 10860 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10861 | f2py_stop_clock(); | |||
| 10862 | #endif | |||
| 10863 | return capi_buildvalue; | |||
| 10864 | } | |||
| 10865 | /******************************** end of cspmv ********************************/ | |||
| 10866 | ||||
| 10867 | /*********************************** zspmv ***********************************/ | |||
| 10868 | static char doc_f2py_rout__fblas_zspmv[] = "\ | |||
| 10869 | yout = zspmv(n,alpha,ap,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``zspmv``.\ | |||
| 10870 | \n\nParameters\n----------\n" | |||
| 10871 | "n : input int\n" | |||
| 10872 | "alpha : input complex\n" | |||
| 10873 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 10874 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 10875 | "\nOther Parameters\n----------------\n" | |||
| 10876 | "incx : input int, optional\n Default: 1\n" | |||
| 10877 | "offx : input int, optional\n Default: 0\n" | |||
| 10878 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 10879 | "y : input rank-1 array('D') with bounds (ly)\n" | |||
| 10880 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 10881 | "incy : input int, optional\n Default: 1\n" | |||
| 10882 | "offy : input int, optional\n Default: 0\n" | |||
| 10883 | "lower : input int, optional\n Default: 0\n" | |||
| 10884 | "\nReturns\n-------\n" | |||
| 10885 | "yout : rank-1 array('D') with bounds (ly) and y storage"; | |||
| 10886 | /* extern void F_FUNC(zspmv,ZSPMV)(char*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 10887 | static PyObject *f2py_rout__fblas_zspmv(const PyObject *capi_self, | |||
| 10888 | PyObject *capi_args, | |||
| 10889 | PyObject *capi_keywds, | |||
| 10890 | void (*f2py_func)(char*,F_INTint*,complex_double*,complex_double*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 10891 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 10892 | volatile int f2py_success = 1; | |||
| 10893 | /*decl*/ | |||
| 10894 | ||||
| 10895 | int n = 0; | |||
| 10896 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 10897 | complex_double alpha; | |||
| 10898 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 10899 | complex_double *ap = NULL((void*)0); | |||
| 10900 | npy_intp ap_Dims[1] = {-1}; | |||
| 10901 | const int ap_Rank = 1; | |||
| 10902 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 10903 | int capi_ap_intent = 0; | |||
| 10904 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 10905 | complex_double *x = NULL((void*)0); | |||
| 10906 | npy_intp x_Dims[1] = {-1}; | |||
| 10907 | const int x_Rank = 1; | |||
| 10908 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 10909 | int capi_x_intent = 0; | |||
| 10910 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 10911 | int incx = 0; | |||
| 10912 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 10913 | int offx = 0; | |||
| 10914 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 10915 | complex_double beta; | |||
| 10916 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 10917 | complex_double *y = NULL((void*)0); | |||
| 10918 | npy_intp y_Dims[1] = {-1}; | |||
| 10919 | const int y_Rank = 1; | |||
| 10920 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 10921 | int capi_y_intent = 0; | |||
| 10922 | int capi_overwrite_y = 0; | |||
| 10923 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 10924 | int incy = 0; | |||
| 10925 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 10926 | int offy = 0; | |||
| 10927 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 10928 | int lower = 0; | |||
| 10929 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 10930 | int ly = 0; | |||
| 10931 | static char *capi_kwlist[] = {"n","alpha","ap","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 10932 | ||||
| 10933 | /*routdebugenter*/ | |||
| 10934 | #ifdef F2PY_REPORT_ATEXIT | |||
| 10935 | f2py_start_clock(); | |||
| 10936 | #endif | |||
| 10937 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 10938 | "OOOO|OOOOOOOi:_fblas.zspmv",\ | |||
| 10939 | capi_kwlist,&n_capi,&alpha_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 10940 | return NULL((void*)0); | |||
| 10941 | /*frompyobj*/ | |||
| 10942 | /* Processing variable lower */ | |||
| 10943 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 10944 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zspmv() 7th keyword (lower) can't be converted to int"); | |||
| 10945 | if (f2py_success) { | |||
| 10946 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","zspmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10947 | /* Processing variable n */ | |||
| 10948 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zspmv() 1st argument (n) can't be converted to int"); | |||
| 10949 | if (f2py_success) { | |||
| 10950 | CHECKSCALAR(n>=0,"n>=0","1st argument n","zspmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 10951 | /* Processing variable incx */ | |||
| 10952 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 10953 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zspmv() 1st keyword (incx) can't be converted to int"); | |||
| 10954 | if (f2py_success) { | |||
| 10955 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zspmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10956 | /* Processing variable incy */ | |||
| 10957 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 10958 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zspmv() 5th keyword (incy) can't be converted to int"); | |||
| 10959 | if (f2py_success) { | |||
| 10960 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zspmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 10961 | /* Processing variable offx */ | |||
| 10962 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 10963 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zspmv() 2nd keyword (offx) can't be converted to int"); | |||
| 10964 | if (f2py_success) { | |||
| 10965 | /* Processing variable offy */ | |||
| 10966 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 10967 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zspmv() 6th keyword (offy) can't be converted to int"); | |||
| 10968 | if (f2py_success) { | |||
| 10969 | /* Processing variable alpha */ | |||
| 10970 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zspmv() 2nd argument (alpha) can't be converted to complex_double"); | |||
| 10971 | if (f2py_success) { | |||
| 10972 | /* Processing variable beta */ | |||
| 10973 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 10974 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zspmv() 3rd keyword (beta) can't be converted to complex_double"); | |||
| 10975 | if (f2py_success) { | |||
| 10976 | /* Processing variable ly */ | |||
| 10977 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 10978 | /* Processing variable ap */ | |||
| 10979 | ; | |||
| 10980 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 10981 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 10982 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 10983 | if (!PyErr_Occurred()) | |||
| 10984 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `ap' of _fblas.zspmv to C/Fortran array" ); | |||
| 10985 | } else { | |||
| 10986 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 10987 | ||||
| 10988 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","3rd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""3rd argument ap" ); } else { | |||
| 10989 | /* Processing variable y */ | |||
| 10990 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 10991 | y_Dims[0]=ly; | |||
| 10992 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 10993 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 10994 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 10995 | if (!PyErr_Occurred()) | |||
| 10996 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.zspmv to C/Fortran array" ); | |||
| 10997 | } else { | |||
| 10998 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 10999 | ||||
| 11000 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 11001 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 11002 | /* Processing variable x */ | |||
| 11003 | ; | |||
| 11004 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 11005 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 11006 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 11007 | if (!PyErr_Occurred()) | |||
| 11008 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.zspmv to C/Fortran array" ); | |||
| 11009 | } else { | |||
| 11010 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 11011 | ||||
| 11012 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 11013 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 11014 | /*end of frompyobj*/ | |||
| 11015 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11016 | f2py_start_call_clock(); | |||
| 11017 | #endif | |||
| 11018 | /*callfortranroutine*/ | |||
| 11019 | (*f2py_func)((lower?"L":"U"),&n,&alpha,ap,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 11020 | /*(*f2py_func)(&n,&alpha,ap,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 11021 | if (PyErr_Occurred()) | |||
| 11022 | f2py_success = 0; | |||
| 11023 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11024 | f2py_stop_call_clock(); | |||
| 11025 | #endif | |||
| 11026 | /*end of callfortranroutine*/ | |||
| 11027 | if (f2py_success) { | |||
| 11028 | /*pyobjfrom*/ | |||
| 11029 | /*end of pyobjfrom*/ | |||
| 11030 | CFUNCSMESS("Building return value.\n"); | |||
| 11031 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 11032 | /*closepyobjfrom*/ | |||
| 11033 | /*end of closepyobjfrom*/ | |||
| 11034 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 11035 | /*cleanupfrompyobj*/ | |||
| 11036 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 11037 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 11038 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 11039 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 11040 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 11041 | /* End of cleaning variable x */ | |||
| 11042 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 11043 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 11044 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 11045 | /* End of cleaning variable y */ | |||
| 11046 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 11047 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 11048 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 11049 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 11050 | /* End of cleaning variable ap */ | |||
| 11051 | /* End of cleaning variable ly */ | |||
| 11052 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 11053 | /* End of cleaning variable beta */ | |||
| 11054 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 11055 | /* End of cleaning variable alpha */ | |||
| 11056 | } /*if (f2py_success) of offy*/ | |||
| 11057 | /* End of cleaning variable offy */ | |||
| 11058 | } /*if (f2py_success) of offx*/ | |||
| 11059 | /* End of cleaning variable offx */ | |||
| 11060 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 11061 | } /*if (f2py_success) of incy*/ | |||
| 11062 | /* End of cleaning variable incy */ | |||
| 11063 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 11064 | } /*if (f2py_success) of incx*/ | |||
| 11065 | /* End of cleaning variable incx */ | |||
| 11066 | } /*CHECKSCALAR(n>=0)*/ | |||
| 11067 | } /*if (f2py_success) of n*/ | |||
| 11068 | /* End of cleaning variable n */ | |||
| 11069 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 11070 | } /*if (f2py_success) of lower*/ | |||
| 11071 | /* End of cleaning variable lower */ | |||
| 11072 | /*end of cleanupfrompyobj*/ | |||
| 11073 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 11074 | /*routdebugfailure*/ | |||
| 11075 | } else { | |||
| 11076 | /*routdebugleave*/ | |||
| 11077 | } | |||
| 11078 | CFUNCSMESS("Freeing memory.\n"); | |||
| 11079 | /*freemem*/ | |||
| 11080 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11081 | f2py_stop_clock(); | |||
| 11082 | #endif | |||
| 11083 | return capi_buildvalue; | |||
| 11084 | } | |||
| 11085 | /******************************** end of zspmv ********************************/ | |||
| 11086 | ||||
| 11087 | /*********************************** chpmv ***********************************/ | |||
| 11088 | static char doc_f2py_rout__fblas_chpmv[] = "\ | |||
| 11089 | yout = chpmv(n,alpha,ap,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``chpmv``.\ | |||
| 11090 | \n\nParameters\n----------\n" | |||
| 11091 | "n : input int\n" | |||
| 11092 | "alpha : input complex\n" | |||
| 11093 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 11094 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 11095 | "\nOther Parameters\n----------------\n" | |||
| 11096 | "incx : input int, optional\n Default: 1\n" | |||
| 11097 | "offx : input int, optional\n Default: 0\n" | |||
| 11098 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 11099 | "y : input rank-1 array('F') with bounds (ly)\n" | |||
| 11100 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 11101 | "incy : input int, optional\n Default: 1\n" | |||
| 11102 | "offy : input int, optional\n Default: 0\n" | |||
| 11103 | "lower : input int, optional\n Default: 0\n" | |||
| 11104 | "\nReturns\n-------\n" | |||
| 11105 | "yout : rank-1 array('F') with bounds (ly) and y storage"; | |||
| 11106 | /* extern void F_FUNC(chpmv,CHPMV)(char*,F_INT*,complex_float*,complex_float*,complex_float*,F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 11107 | static PyObject *f2py_rout__fblas_chpmv(const PyObject *capi_self, | |||
| 11108 | PyObject *capi_args, | |||
| 11109 | PyObject *capi_keywds, | |||
| 11110 | void (*f2py_func)(char*,F_INTint*,complex_float*,complex_float*,complex_float*,F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 11111 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 11112 | volatile int f2py_success = 1; | |||
| 11113 | /*decl*/ | |||
| 11114 | ||||
| 11115 | int n = 0; | |||
| 11116 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 11117 | complex_float alpha; | |||
| 11118 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 11119 | complex_float *ap = NULL((void*)0); | |||
| 11120 | npy_intp ap_Dims[1] = {-1}; | |||
| 11121 | const int ap_Rank = 1; | |||
| 11122 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 11123 | int capi_ap_intent = 0; | |||
| 11124 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 11125 | complex_float *x = NULL((void*)0); | |||
| 11126 | npy_intp x_Dims[1] = {-1}; | |||
| 11127 | const int x_Rank = 1; | |||
| 11128 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 11129 | int capi_x_intent = 0; | |||
| 11130 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 11131 | int incx = 0; | |||
| 11132 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 11133 | int offx = 0; | |||
| 11134 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 11135 | complex_float beta; | |||
| 11136 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 11137 | complex_float *y = NULL((void*)0); | |||
| 11138 | npy_intp y_Dims[1] = {-1}; | |||
| 11139 | const int y_Rank = 1; | |||
| 11140 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 11141 | int capi_y_intent = 0; | |||
| 11142 | int capi_overwrite_y = 0; | |||
| 11143 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 11144 | int incy = 0; | |||
| 11145 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 11146 | int offy = 0; | |||
| 11147 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 11148 | int lower = 0; | |||
| 11149 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 11150 | int ly = 0; | |||
| 11151 | static char *capi_kwlist[] = {"n","alpha","ap","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 11152 | ||||
| 11153 | /*routdebugenter*/ | |||
| 11154 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11155 | f2py_start_clock(); | |||
| 11156 | #endif | |||
| 11157 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 11158 | "OOOO|OOOOOOOi:_fblas.chpmv",\ | |||
| 11159 | capi_kwlist,&n_capi,&alpha_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 11160 | return NULL((void*)0); | |||
| 11161 | /*frompyobj*/ | |||
| 11162 | /* Processing variable lower */ | |||
| 11163 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 11164 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.chpmv() 7th keyword (lower) can't be converted to int"); | |||
| 11165 | if (f2py_success) { | |||
| 11166 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","chpmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11167 | /* Processing variable n */ | |||
| 11168 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.chpmv() 1st argument (n) can't be converted to int"); | |||
| 11169 | if (f2py_success) { | |||
| 11170 | CHECKSCALAR(n>=0,"n>=0","1st argument n","chpmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 11171 | /* Processing variable incx */ | |||
| 11172 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 11173 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.chpmv() 1st keyword (incx) can't be converted to int"); | |||
| 11174 | if (f2py_success) { | |||
| 11175 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","chpmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11176 | /* Processing variable incy */ | |||
| 11177 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 11178 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.chpmv() 5th keyword (incy) can't be converted to int"); | |||
| 11179 | if (f2py_success) { | |||
| 11180 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","chpmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11181 | /* Processing variable offx */ | |||
| 11182 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 11183 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.chpmv() 2nd keyword (offx) can't be converted to int"); | |||
| 11184 | if (f2py_success) { | |||
| 11185 | /* Processing variable offy */ | |||
| 11186 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 11187 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.chpmv() 6th keyword (offy) can't be converted to int"); | |||
| 11188 | if (f2py_success) { | |||
| 11189 | /* Processing variable alpha */ | |||
| 11190 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.chpmv() 2nd argument (alpha) can't be converted to complex_float"); | |||
| 11191 | if (f2py_success) { | |||
| 11192 | /* Processing variable beta */ | |||
| 11193 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 11194 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.chpmv() 3rd keyword (beta) can't be converted to complex_float"); | |||
| 11195 | if (f2py_success) { | |||
| 11196 | /* Processing variable ly */ | |||
| 11197 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 11198 | /* Processing variable ap */ | |||
| 11199 | ; | |||
| 11200 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 11201 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 11202 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 11203 | if (!PyErr_Occurred()) | |||
| 11204 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `ap' of _fblas.chpmv to C/Fortran array" ); | |||
| 11205 | } else { | |||
| 11206 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 11207 | ||||
| 11208 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","3rd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""3rd argument ap" ); } else { | |||
| 11209 | /* Processing variable y */ | |||
| 11210 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 11211 | y_Dims[0]=ly; | |||
| 11212 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 11213 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 11214 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 11215 | if (!PyErr_Occurred()) | |||
| 11216 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.chpmv to C/Fortran array" ); | |||
| 11217 | } else { | |||
| 11218 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 11219 | ||||
| 11220 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 11221 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 11222 | /* Processing variable x */ | |||
| 11223 | ; | |||
| 11224 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 11225 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 11226 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 11227 | if (!PyErr_Occurred()) | |||
| 11228 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.chpmv to C/Fortran array" ); | |||
| 11229 | } else { | |||
| 11230 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 11231 | ||||
| 11232 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 11233 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 11234 | /*end of frompyobj*/ | |||
| 11235 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11236 | f2py_start_call_clock(); | |||
| 11237 | #endif | |||
| 11238 | /*callfortranroutine*/ | |||
| 11239 | (*f2py_func)((lower?"L":"U"),&n,&alpha,ap,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 11240 | /*(*f2py_func)(&n,&alpha,ap,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 11241 | if (PyErr_Occurred()) | |||
| 11242 | f2py_success = 0; | |||
| 11243 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11244 | f2py_stop_call_clock(); | |||
| 11245 | #endif | |||
| 11246 | /*end of callfortranroutine*/ | |||
| 11247 | if (f2py_success) { | |||
| 11248 | /*pyobjfrom*/ | |||
| 11249 | /*end of pyobjfrom*/ | |||
| 11250 | CFUNCSMESS("Building return value.\n"); | |||
| 11251 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 11252 | /*closepyobjfrom*/ | |||
| 11253 | /*end of closepyobjfrom*/ | |||
| 11254 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 11255 | /*cleanupfrompyobj*/ | |||
| 11256 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 11257 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 11258 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 11259 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 11260 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 11261 | /* End of cleaning variable x */ | |||
| 11262 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 11263 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 11264 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 11265 | /* End of cleaning variable y */ | |||
| 11266 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 11267 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 11268 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 11269 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 11270 | /* End of cleaning variable ap */ | |||
| 11271 | /* End of cleaning variable ly */ | |||
| 11272 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 11273 | /* End of cleaning variable beta */ | |||
| 11274 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 11275 | /* End of cleaning variable alpha */ | |||
| 11276 | } /*if (f2py_success) of offy*/ | |||
| 11277 | /* End of cleaning variable offy */ | |||
| 11278 | } /*if (f2py_success) of offx*/ | |||
| 11279 | /* End of cleaning variable offx */ | |||
| 11280 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 11281 | } /*if (f2py_success) of incy*/ | |||
| 11282 | /* End of cleaning variable incy */ | |||
| 11283 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 11284 | } /*if (f2py_success) of incx*/ | |||
| 11285 | /* End of cleaning variable incx */ | |||
| 11286 | } /*CHECKSCALAR(n>=0)*/ | |||
| 11287 | } /*if (f2py_success) of n*/ | |||
| 11288 | /* End of cleaning variable n */ | |||
| 11289 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 11290 | } /*if (f2py_success) of lower*/ | |||
| 11291 | /* End of cleaning variable lower */ | |||
| 11292 | /*end of cleanupfrompyobj*/ | |||
| 11293 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 11294 | /*routdebugfailure*/ | |||
| 11295 | } else { | |||
| 11296 | /*routdebugleave*/ | |||
| 11297 | } | |||
| 11298 | CFUNCSMESS("Freeing memory.\n"); | |||
| 11299 | /*freemem*/ | |||
| 11300 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11301 | f2py_stop_clock(); | |||
| 11302 | #endif | |||
| 11303 | return capi_buildvalue; | |||
| 11304 | } | |||
| 11305 | /******************************** end of chpmv ********************************/ | |||
| 11306 | ||||
| 11307 | /*********************************** zhpmv ***********************************/ | |||
| 11308 | static char doc_f2py_rout__fblas_zhpmv[] = "\ | |||
| 11309 | yout = zhpmv(n,alpha,ap,x,[incx,offx,beta,y,incy,offy,lower,overwrite_y])\n\nWrapper for ``zhpmv``.\ | |||
| 11310 | \n\nParameters\n----------\n" | |||
| 11311 | "n : input int\n" | |||
| 11312 | "alpha : input complex\n" | |||
| 11313 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 11314 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 11315 | "\nOther Parameters\n----------------\n" | |||
| 11316 | "incx : input int, optional\n Default: 1\n" | |||
| 11317 | "offx : input int, optional\n Default: 0\n" | |||
| 11318 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 11319 | "y : input rank-1 array('D') with bounds (ly)\n" | |||
| 11320 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 11321 | "incy : input int, optional\n Default: 1\n" | |||
| 11322 | "offy : input int, optional\n Default: 0\n" | |||
| 11323 | "lower : input int, optional\n Default: 0\n" | |||
| 11324 | "\nReturns\n-------\n" | |||
| 11325 | "yout : rank-1 array('D') with bounds (ly) and y storage"; | |||
| 11326 | /* extern void F_FUNC(zhpmv,ZHPMV)(char*,F_INT*,complex_double*,complex_double*,complex_double*,F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 11327 | static PyObject *f2py_rout__fblas_zhpmv(const PyObject *capi_self, | |||
| 11328 | PyObject *capi_args, | |||
| 11329 | PyObject *capi_keywds, | |||
| 11330 | void (*f2py_func)(char*,F_INTint*,complex_double*,complex_double*,complex_double*,F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 11331 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 11332 | volatile int f2py_success = 1; | |||
| 11333 | /*decl*/ | |||
| 11334 | ||||
| 11335 | int n = 0; | |||
| 11336 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 11337 | complex_double alpha; | |||
| 11338 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 11339 | complex_double *ap = NULL((void*)0); | |||
| 11340 | npy_intp ap_Dims[1] = {-1}; | |||
| 11341 | const int ap_Rank = 1; | |||
| 11342 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 11343 | int capi_ap_intent = 0; | |||
| 11344 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 11345 | complex_double *x = NULL((void*)0); | |||
| 11346 | npy_intp x_Dims[1] = {-1}; | |||
| 11347 | const int x_Rank = 1; | |||
| 11348 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 11349 | int capi_x_intent = 0; | |||
| 11350 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 11351 | int incx = 0; | |||
| 11352 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 11353 | int offx = 0; | |||
| 11354 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 11355 | complex_double beta; | |||
| 11356 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 11357 | complex_double *y = NULL((void*)0); | |||
| 11358 | npy_intp y_Dims[1] = {-1}; | |||
| 11359 | const int y_Rank = 1; | |||
| 11360 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 11361 | int capi_y_intent = 0; | |||
| 11362 | int capi_overwrite_y = 0; | |||
| 11363 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 11364 | int incy = 0; | |||
| 11365 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 11366 | int offy = 0; | |||
| 11367 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 11368 | int lower = 0; | |||
| 11369 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 11370 | int ly = 0; | |||
| 11371 | static char *capi_kwlist[] = {"n","alpha","ap","x","incx","offx","beta","y","incy","offy","lower","overwrite_y",NULL((void*)0)}; | |||
| 11372 | ||||
| 11373 | /*routdebugenter*/ | |||
| 11374 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11375 | f2py_start_clock(); | |||
| 11376 | #endif | |||
| 11377 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 11378 | "OOOO|OOOOOOOi:_fblas.zhpmv",\ | |||
| 11379 | capi_kwlist,&n_capi,&alpha_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&beta_capi,&y_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 11380 | return NULL((void*)0); | |||
| 11381 | /*frompyobj*/ | |||
| 11382 | /* Processing variable lower */ | |||
| 11383 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 11384 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zhpmv() 7th keyword (lower) can't be converted to int"); | |||
| 11385 | if (f2py_success) { | |||
| 11386 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","zhpmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpmv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11387 | /* Processing variable n */ | |||
| 11388 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zhpmv() 1st argument (n) can't be converted to int"); | |||
| 11389 | if (f2py_success) { | |||
| 11390 | CHECKSCALAR(n>=0,"n>=0","1st argument n","zhpmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 11391 | /* Processing variable incx */ | |||
| 11392 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 11393 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zhpmv() 1st keyword (incx) can't be converted to int"); | |||
| 11394 | if (f2py_success) { | |||
| 11395 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zhpmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11396 | /* Processing variable incy */ | |||
| 11397 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 11398 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zhpmv() 5th keyword (incy) can't be converted to int"); | |||
| 11399 | if (f2py_success) { | |||
| 11400 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","5th keyword incy","zhpmv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpmv:incy=%d", "(""incy>0||incy<0"") failed for " "5th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11401 | /* Processing variable offx */ | |||
| 11402 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 11403 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zhpmv() 2nd keyword (offx) can't be converted to int"); | |||
| 11404 | if (f2py_success) { | |||
| 11405 | /* Processing variable offy */ | |||
| 11406 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 11407 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zhpmv() 6th keyword (offy) can't be converted to int"); | |||
| 11408 | if (f2py_success) { | |||
| 11409 | /* Processing variable alpha */ | |||
| 11410 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zhpmv() 2nd argument (alpha) can't be converted to complex_double"); | |||
| 11411 | if (f2py_success) { | |||
| 11412 | /* Processing variable beta */ | |||
| 11413 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 11414 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zhpmv() 3rd keyword (beta) can't be converted to complex_double"); | |||
| 11415 | if (f2py_success) { | |||
| 11416 | /* Processing variable ly */ | |||
| 11417 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 11418 | /* Processing variable ap */ | |||
| 11419 | ; | |||
| 11420 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 11421 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 11422 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 11423 | if (!PyErr_Occurred()) | |||
| 11424 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `ap' of _fblas.zhpmv to C/Fortran array" ); | |||
| 11425 | } else { | |||
| 11426 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 11427 | ||||
| 11428 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","3rd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""3rd argument ap" ); } else { | |||
| 11429 | /* Processing variable y */ | |||
| 11430 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 11431 | y_Dims[0]=ly; | |||
| 11432 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 11433 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 11434 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 11435 | if (!PyErr_Occurred()) | |||
| 11436 | PyErr_SetString(_fblas_error,"failed in converting 4th keyword `y' of _fblas.zhpmv to C/Fortran array" ); | |||
| 11437 | } else { | |||
| 11438 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 11439 | ||||
| 11440 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th keyword y" ); } else { | |||
| 11441 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th keyword y"); } else { | |||
| 11442 | /* Processing variable x */ | |||
| 11443 | ; | |||
| 11444 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 11445 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 11446 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 11447 | if (!PyErr_Occurred()) | |||
| 11448 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `x' of _fblas.zhpmv to C/Fortran array" ); | |||
| 11449 | } else { | |||
| 11450 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 11451 | ||||
| 11452 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","4th argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""4th argument x" ); } else { | |||
| 11453 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","4th argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "4th argument x"); } else { | |||
| 11454 | /*end of frompyobj*/ | |||
| 11455 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11456 | f2py_start_call_clock(); | |||
| 11457 | #endif | |||
| 11458 | /*callfortranroutine*/ | |||
| 11459 | (*f2py_func)((lower?"L":"U"),&n,&alpha,ap,x+offx,&incx,&beta,y+offy,&incy) ; | |||
| 11460 | /*(*f2py_func)(&n,&alpha,ap,x,&incx,&offx,&beta,y,&incy,&offy,&lower,&ly);*/ | |||
| 11461 | if (PyErr_Occurred()) | |||
| 11462 | f2py_success = 0; | |||
| 11463 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11464 | f2py_stop_call_clock(); | |||
| 11465 | #endif | |||
| 11466 | /*end of callfortranroutine*/ | |||
| 11467 | if (f2py_success) { | |||
| 11468 | /*pyobjfrom*/ | |||
| 11469 | /*end of pyobjfrom*/ | |||
| 11470 | CFUNCSMESS("Building return value.\n"); | |||
| 11471 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 11472 | /*closepyobjfrom*/ | |||
| 11473 | /*end of closepyobjfrom*/ | |||
| 11474 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 11475 | /*cleanupfrompyobj*/ | |||
| 11476 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 11477 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 11478 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 11479 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 11480 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 11481 | /* End of cleaning variable x */ | |||
| 11482 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 11483 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 11484 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 11485 | /* End of cleaning variable y */ | |||
| 11486 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 11487 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 11488 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 11489 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 11490 | /* End of cleaning variable ap */ | |||
| 11491 | /* End of cleaning variable ly */ | |||
| 11492 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 11493 | /* End of cleaning variable beta */ | |||
| 11494 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 11495 | /* End of cleaning variable alpha */ | |||
| 11496 | } /*if (f2py_success) of offy*/ | |||
| 11497 | /* End of cleaning variable offy */ | |||
| 11498 | } /*if (f2py_success) of offx*/ | |||
| 11499 | /* End of cleaning variable offx */ | |||
| 11500 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 11501 | } /*if (f2py_success) of incy*/ | |||
| 11502 | /* End of cleaning variable incy */ | |||
| 11503 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 11504 | } /*if (f2py_success) of incx*/ | |||
| 11505 | /* End of cleaning variable incx */ | |||
| 11506 | } /*CHECKSCALAR(n>=0)*/ | |||
| 11507 | } /*if (f2py_success) of n*/ | |||
| 11508 | /* End of cleaning variable n */ | |||
| 11509 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 11510 | } /*if (f2py_success) of lower*/ | |||
| 11511 | /* End of cleaning variable lower */ | |||
| 11512 | /*end of cleanupfrompyobj*/ | |||
| 11513 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 11514 | /*routdebugfailure*/ | |||
| 11515 | } else { | |||
| 11516 | /*routdebugleave*/ | |||
| 11517 | } | |||
| 11518 | CFUNCSMESS("Freeing memory.\n"); | |||
| 11519 | /*freemem*/ | |||
| 11520 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11521 | f2py_stop_clock(); | |||
| 11522 | #endif | |||
| 11523 | return capi_buildvalue; | |||
| 11524 | } | |||
| 11525 | /******************************** end of zhpmv ********************************/ | |||
| 11526 | ||||
| 11527 | /*********************************** ssymv ***********************************/ | |||
| 11528 | static char doc_f2py_rout__fblas_ssymv[] = "\ | |||
| 11529 | y = ssymv(alpha,a,x,[beta,y,offx,incx,offy,incy,lower,overwrite_y])\n\nWrapper for ``ssymv``.\ | |||
| 11530 | \n\nParameters\n----------\n" | |||
| 11531 | "alpha : input float\n" | |||
| 11532 | "a : input rank-2 array('f') with bounds (n,n)\n" | |||
| 11533 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 11534 | "\nOther Parameters\n----------------\n" | |||
| 11535 | "beta : input float, optional\n Default: 0.0\n" | |||
| 11536 | "y : input rank-1 array('f') with bounds (ly)\n" | |||
| 11537 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 11538 | "offx : input int, optional\n Default: 0\n" | |||
| 11539 | "incx : input int, optional\n Default: 1\n" | |||
| 11540 | "offy : input int, optional\n Default: 0\n" | |||
| 11541 | "incy : input int, optional\n Default: 1\n" | |||
| 11542 | "lower : input int, optional\n Default: 0\n" | |||
| 11543 | "\nReturns\n-------\n" | |||
| 11544 | "y : rank-1 array('f') with bounds (ly)"; | |||
| 11545 | /* extern void F_FUNC(ssymv,SSYMV)(char*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float*, float*,F_INT* ); */ | |||
| 11546 | static PyObject *f2py_rout__fblas_ssymv(const PyObject *capi_self, | |||
| 11547 | PyObject *capi_args, | |||
| 11548 | PyObject *capi_keywds, | |||
| 11549 | void (*f2py_func)(char*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float*, float*,F_INTint* )) { | |||
| 11550 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 11551 | volatile int f2py_success = 1; | |||
| 11552 | /*decl*/ | |||
| 11553 | ||||
| 11554 | int n = 0; | |||
| 11555 | float alpha = 0; | |||
| 11556 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 11557 | float *a = NULL((void*)0); | |||
| 11558 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 11559 | const int a_Rank = 2; | |||
| 11560 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 11561 | int capi_a_intent = 0; | |||
| 11562 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 11563 | float *x = NULL((void*)0); | |||
| 11564 | npy_intp x_Dims[1] = {-1}; | |||
| 11565 | const int x_Rank = 1; | |||
| 11566 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 11567 | int capi_x_intent = 0; | |||
| 11568 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 11569 | float beta = 0; | |||
| 11570 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 11571 | float *y = NULL((void*)0); | |||
| 11572 | npy_intp y_Dims[1] = {-1}; | |||
| 11573 | const int y_Rank = 1; | |||
| 11574 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 11575 | int capi_y_intent = 0; | |||
| 11576 | int capi_overwrite_y = 0; | |||
| 11577 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 11578 | int offx = 0; | |||
| 11579 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 11580 | int incx = 0; | |||
| 11581 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 11582 | int offy = 0; | |||
| 11583 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 11584 | int incy = 0; | |||
| 11585 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 11586 | int lower = 0; | |||
| 11587 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 11588 | int ly = 0; | |||
| 11589 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","lower","overwrite_y",NULL((void*)0)}; | |||
| 11590 | ||||
| 11591 | /*routdebugenter*/ | |||
| 11592 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11593 | f2py_start_clock(); | |||
| 11594 | #endif | |||
| 11595 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 11596 | "OOO|OOOOOOOi:_fblas.ssymv",\ | |||
| 11597 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 11598 | return NULL((void*)0); | |||
| 11599 | /*frompyobj*/ | |||
| 11600 | /* Processing variable lower */ | |||
| 11601 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 11602 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssymv() 7th keyword (lower) can't be converted to int"); | |||
| 11603 | if (f2py_success) { | |||
| 11604 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","ssymv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssymv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11605 | /* Processing variable incx */ | |||
| 11606 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 11607 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ssymv() 4th keyword (incx) can't be converted to int"); | |||
| 11608 | if (f2py_success) { | |||
| 11609 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","ssymv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssymv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11610 | /* Processing variable incy */ | |||
| 11611 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 11612 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.ssymv() 6th keyword (incy) can't be converted to int"); | |||
| 11613 | if (f2py_success) { | |||
| 11614 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","ssymv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssymv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11615 | /* Processing variable alpha */ | |||
| 11616 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssymv() 1st argument (alpha) can't be converted to float"); | |||
| 11617 | if (f2py_success) { | |||
| 11618 | /* Processing variable beta */ | |||
| 11619 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 11620 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.ssymv() 1st keyword (beta) can't be converted to float"); | |||
| 11621 | if (f2py_success) { | |||
| 11622 | /* Processing variable a */ | |||
| 11623 | ; | |||
| 11624 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 11625 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 11626 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 11627 | if (!PyErr_Occurred()) | |||
| 11628 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ssymv to C/Fortran array" ); | |||
| 11629 | } else { | |||
| 11630 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 11631 | ||||
| 11632 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 11633 | /* Processing variable offx */ | |||
| 11634 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 11635 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ssymv() 3rd keyword (offx) can't be converted to int"); | |||
| 11636 | if (f2py_success) { | |||
| 11637 | /* Processing variable offy */ | |||
| 11638 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 11639 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.ssymv() 5th keyword (offy) can't be converted to int"); | |||
| 11640 | if (f2py_success) { | |||
| 11641 | /* Processing variable n */ | |||
| 11642 | n = shape(a,0)a_Dims[0]; | |||
| 11643 | /* Processing variable x */ | |||
| 11644 | ; | |||
| 11645 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 11646 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 11647 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 11648 | if (!PyErr_Occurred()) | |||
| 11649 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ssymv to C/Fortran array" ); | |||
| 11650 | } else { | |||
| 11651 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 11652 | ||||
| 11653 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 11654 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 11655 | /* Processing variable ly */ | |||
| 11656 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 11657 | /* Processing variable y */ | |||
| 11658 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 11659 | y_Dims[0]=ly; | |||
| 11660 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 11661 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 11662 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 11663 | if (!PyErr_Occurred()) | |||
| 11664 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.ssymv to C/Fortran array" ); | |||
| 11665 | } else { | |||
| 11666 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 11667 | ||||
| 11668 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""2nd keyword y" ); } else { | |||
| 11669 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 11670 | /*end of frompyobj*/ | |||
| 11671 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11672 | f2py_start_call_clock(); | |||
| 11673 | #endif | |||
| 11674 | /*callfortranroutine*/ | |||
| 11675 | (*f2py_func)((lower?"L":"U"),&n,&alpha,a,&n,x+offx,&incx,&beta, y+offy,&incy) ; | |||
| 11676 | /*(*f2py_func)(&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&lower,&ly);*/ | |||
| 11677 | if (PyErr_Occurred()) | |||
| 11678 | f2py_success = 0; | |||
| 11679 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11680 | f2py_stop_call_clock(); | |||
| 11681 | #endif | |||
| 11682 | /*end of callfortranroutine*/ | |||
| 11683 | if (f2py_success) { | |||
| 11684 | /*pyobjfrom*/ | |||
| 11685 | /*end of pyobjfrom*/ | |||
| 11686 | CFUNCSMESS("Building return value.\n"); | |||
| 11687 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 11688 | /*closepyobjfrom*/ | |||
| 11689 | /*end of closepyobjfrom*/ | |||
| 11690 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 11691 | /*cleanupfrompyobj*/ | |||
| 11692 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 11693 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 11694 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 11695 | /* End of cleaning variable y */ | |||
| 11696 | /* End of cleaning variable ly */ | |||
| 11697 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 11698 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 11699 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 11700 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 11701 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 11702 | /* End of cleaning variable x */ | |||
| 11703 | /* End of cleaning variable n */ | |||
| 11704 | } /*if (f2py_success) of offy*/ | |||
| 11705 | /* End of cleaning variable offy */ | |||
| 11706 | } /*if (f2py_success) of offx*/ | |||
| 11707 | /* End of cleaning variable offx */ | |||
| 11708 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 11709 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 11710 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 11711 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 11712 | /* End of cleaning variable a */ | |||
| 11713 | } /*if (f2py_success) of beta*/ | |||
| 11714 | /* End of cleaning variable beta */ | |||
| 11715 | } /*if (f2py_success) of alpha*/ | |||
| 11716 | /* End of cleaning variable alpha */ | |||
| 11717 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 11718 | } /*if (f2py_success) of incy*/ | |||
| 11719 | /* End of cleaning variable incy */ | |||
| 11720 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 11721 | } /*if (f2py_success) of incx*/ | |||
| 11722 | /* End of cleaning variable incx */ | |||
| 11723 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 11724 | } /*if (f2py_success) of lower*/ | |||
| 11725 | /* End of cleaning variable lower */ | |||
| 11726 | /*end of cleanupfrompyobj*/ | |||
| 11727 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 11728 | /*routdebugfailure*/ | |||
| 11729 | } else { | |||
| 11730 | /*routdebugleave*/ | |||
| 11731 | } | |||
| 11732 | CFUNCSMESS("Freeing memory.\n"); | |||
| 11733 | /*freemem*/ | |||
| 11734 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11735 | f2py_stop_clock(); | |||
| 11736 | #endif | |||
| 11737 | return capi_buildvalue; | |||
| 11738 | } | |||
| 11739 | /******************************** end of ssymv ********************************/ | |||
| 11740 | ||||
| 11741 | /*********************************** dsymv ***********************************/ | |||
| 11742 | static char doc_f2py_rout__fblas_dsymv[] = "\ | |||
| 11743 | y = dsymv(alpha,a,x,[beta,y,offx,incx,offy,incy,lower,overwrite_y])\n\nWrapper for ``dsymv``.\ | |||
| 11744 | \n\nParameters\n----------\n" | |||
| 11745 | "alpha : input float\n" | |||
| 11746 | "a : input rank-2 array('d') with bounds (n,n)\n" | |||
| 11747 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 11748 | "\nOther Parameters\n----------------\n" | |||
| 11749 | "beta : input float, optional\n Default: 0.0\n" | |||
| 11750 | "y : input rank-1 array('d') with bounds (ly)\n" | |||
| 11751 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 11752 | "offx : input int, optional\n Default: 0\n" | |||
| 11753 | "incx : input int, optional\n Default: 1\n" | |||
| 11754 | "offy : input int, optional\n Default: 0\n" | |||
| 11755 | "incy : input int, optional\n Default: 1\n" | |||
| 11756 | "lower : input int, optional\n Default: 0\n" | |||
| 11757 | "\nReturns\n-------\n" | |||
| 11758 | "y : rank-1 array('d') with bounds (ly)"; | |||
| 11759 | /* extern void F_FUNC(dsymv,DSYMV)(char*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double*, double*,F_INT* ); */ | |||
| 11760 | static PyObject *f2py_rout__fblas_dsymv(const PyObject *capi_self, | |||
| 11761 | PyObject *capi_args, | |||
| 11762 | PyObject *capi_keywds, | |||
| 11763 | void (*f2py_func)(char*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double*, double*,F_INTint* )) { | |||
| 11764 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 11765 | volatile int f2py_success = 1; | |||
| 11766 | /*decl*/ | |||
| 11767 | ||||
| 11768 | int n = 0; | |||
| 11769 | double alpha = 0; | |||
| 11770 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 11771 | double *a = NULL((void*)0); | |||
| 11772 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 11773 | const int a_Rank = 2; | |||
| 11774 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 11775 | int capi_a_intent = 0; | |||
| 11776 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 11777 | double *x = NULL((void*)0); | |||
| 11778 | npy_intp x_Dims[1] = {-1}; | |||
| 11779 | const int x_Rank = 1; | |||
| 11780 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 11781 | int capi_x_intent = 0; | |||
| 11782 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 11783 | double beta = 0; | |||
| 11784 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 11785 | double *y = NULL((void*)0); | |||
| 11786 | npy_intp y_Dims[1] = {-1}; | |||
| 11787 | const int y_Rank = 1; | |||
| 11788 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 11789 | int capi_y_intent = 0; | |||
| 11790 | int capi_overwrite_y = 0; | |||
| 11791 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 11792 | int offx = 0; | |||
| 11793 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 11794 | int incx = 0; | |||
| 11795 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 11796 | int offy = 0; | |||
| 11797 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 11798 | int incy = 0; | |||
| 11799 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 11800 | int lower = 0; | |||
| 11801 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 11802 | int ly = 0; | |||
| 11803 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","lower","overwrite_y",NULL((void*)0)}; | |||
| 11804 | ||||
| 11805 | /*routdebugenter*/ | |||
| 11806 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11807 | f2py_start_clock(); | |||
| 11808 | #endif | |||
| 11809 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 11810 | "OOO|OOOOOOOi:_fblas.dsymv",\ | |||
| 11811 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 11812 | return NULL((void*)0); | |||
| 11813 | /*frompyobj*/ | |||
| 11814 | /* Processing variable lower */ | |||
| 11815 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 11816 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsymv() 7th keyword (lower) can't be converted to int"); | |||
| 11817 | if (f2py_success) { | |||
| 11818 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","dsymv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsymv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11819 | /* Processing variable incx */ | |||
| 11820 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 11821 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dsymv() 4th keyword (incx) can't be converted to int"); | |||
| 11822 | if (f2py_success) { | |||
| 11823 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","dsymv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsymv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11824 | /* Processing variable incy */ | |||
| 11825 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 11826 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dsymv() 6th keyword (incy) can't be converted to int"); | |||
| 11827 | if (f2py_success) { | |||
| 11828 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","dsymv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsymv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 11829 | /* Processing variable alpha */ | |||
| 11830 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsymv() 1st argument (alpha) can't be converted to double"); | |||
| 11831 | if (f2py_success) { | |||
| 11832 | /* Processing variable beta */ | |||
| 11833 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 11834 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dsymv() 1st keyword (beta) can't be converted to double"); | |||
| 11835 | if (f2py_success) { | |||
| 11836 | /* Processing variable a */ | |||
| 11837 | ; | |||
| 11838 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 11839 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 11840 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 11841 | if (!PyErr_Occurred()) | |||
| 11842 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dsymv to C/Fortran array" ); | |||
| 11843 | } else { | |||
| 11844 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 11845 | ||||
| 11846 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 11847 | /* Processing variable offx */ | |||
| 11848 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 11849 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dsymv() 3rd keyword (offx) can't be converted to int"); | |||
| 11850 | if (f2py_success) { | |||
| 11851 | /* Processing variable offy */ | |||
| 11852 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 11853 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dsymv() 5th keyword (offy) can't be converted to int"); | |||
| 11854 | if (f2py_success) { | |||
| 11855 | /* Processing variable n */ | |||
| 11856 | n = shape(a,0)a_Dims[0]; | |||
| 11857 | /* Processing variable x */ | |||
| 11858 | ; | |||
| 11859 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 11860 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 11861 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 11862 | if (!PyErr_Occurred()) | |||
| 11863 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dsymv to C/Fortran array" ); | |||
| 11864 | } else { | |||
| 11865 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 11866 | ||||
| 11867 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 11868 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 11869 | /* Processing variable ly */ | |||
| 11870 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 11871 | /* Processing variable y */ | |||
| 11872 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 11873 | y_Dims[0]=ly; | |||
| 11874 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 11875 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 11876 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 11877 | if (!PyErr_Occurred()) | |||
| 11878 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.dsymv to C/Fortran array" ); | |||
| 11879 | } else { | |||
| 11880 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 11881 | ||||
| 11882 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""2nd keyword y" ); } else { | |||
| 11883 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 11884 | /*end of frompyobj*/ | |||
| 11885 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11886 | f2py_start_call_clock(); | |||
| 11887 | #endif | |||
| 11888 | /*callfortranroutine*/ | |||
| 11889 | (*f2py_func)((lower?"L":"U"),&n,&alpha,a,&n,x+offx,&incx,&beta, y+offy,&incy) ; | |||
| 11890 | /*(*f2py_func)(&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&lower,&ly);*/ | |||
| 11891 | if (PyErr_Occurred()) | |||
| 11892 | f2py_success = 0; | |||
| 11893 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11894 | f2py_stop_call_clock(); | |||
| 11895 | #endif | |||
| 11896 | /*end of callfortranroutine*/ | |||
| 11897 | if (f2py_success) { | |||
| 11898 | /*pyobjfrom*/ | |||
| 11899 | /*end of pyobjfrom*/ | |||
| 11900 | CFUNCSMESS("Building return value.\n"); | |||
| 11901 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 11902 | /*closepyobjfrom*/ | |||
| 11903 | /*end of closepyobjfrom*/ | |||
| 11904 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 11905 | /*cleanupfrompyobj*/ | |||
| 11906 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 11907 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 11908 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 11909 | /* End of cleaning variable y */ | |||
| 11910 | /* End of cleaning variable ly */ | |||
| 11911 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 11912 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 11913 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 11914 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 11915 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 11916 | /* End of cleaning variable x */ | |||
| 11917 | /* End of cleaning variable n */ | |||
| 11918 | } /*if (f2py_success) of offy*/ | |||
| 11919 | /* End of cleaning variable offy */ | |||
| 11920 | } /*if (f2py_success) of offx*/ | |||
| 11921 | /* End of cleaning variable offx */ | |||
| 11922 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 11923 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 11924 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 11925 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 11926 | /* End of cleaning variable a */ | |||
| 11927 | } /*if (f2py_success) of beta*/ | |||
| 11928 | /* End of cleaning variable beta */ | |||
| 11929 | } /*if (f2py_success) of alpha*/ | |||
| 11930 | /* End of cleaning variable alpha */ | |||
| 11931 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 11932 | } /*if (f2py_success) of incy*/ | |||
| 11933 | /* End of cleaning variable incy */ | |||
| 11934 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 11935 | } /*if (f2py_success) of incx*/ | |||
| 11936 | /* End of cleaning variable incx */ | |||
| 11937 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 11938 | } /*if (f2py_success) of lower*/ | |||
| 11939 | /* End of cleaning variable lower */ | |||
| 11940 | /*end of cleanupfrompyobj*/ | |||
| 11941 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 11942 | /*routdebugfailure*/ | |||
| 11943 | } else { | |||
| 11944 | /*routdebugleave*/ | |||
| 11945 | } | |||
| 11946 | CFUNCSMESS("Freeing memory.\n"); | |||
| 11947 | /*freemem*/ | |||
| 11948 | #ifdef F2PY_REPORT_ATEXIT | |||
| 11949 | f2py_stop_clock(); | |||
| 11950 | #endif | |||
| 11951 | return capi_buildvalue; | |||
| 11952 | } | |||
| 11953 | /******************************** end of dsymv ********************************/ | |||
| 11954 | ||||
| 11955 | /*********************************** chemv ***********************************/ | |||
| 11956 | static char doc_f2py_rout__fblas_chemv[] = "\ | |||
| 11957 | y = chemv(alpha,a,x,[beta,y,offx,incx,offy,incy,lower,overwrite_y])\n\nWrapper for ``chemv``.\ | |||
| 11958 | \n\nParameters\n----------\n" | |||
| 11959 | "alpha : input complex\n" | |||
| 11960 | "a : input rank-2 array('F') with bounds (n,n)\n" | |||
| 11961 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 11962 | "\nOther Parameters\n----------------\n" | |||
| 11963 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 11964 | "y : input rank-1 array('F') with bounds (ly)\n" | |||
| 11965 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 11966 | "offx : input int, optional\n Default: 0\n" | |||
| 11967 | "incx : input int, optional\n Default: 1\n" | |||
| 11968 | "offy : input int, optional\n Default: 0\n" | |||
| 11969 | "incy : input int, optional\n Default: 1\n" | |||
| 11970 | "lower : input int, optional\n Default: 0\n" | |||
| 11971 | "\nReturns\n-------\n" | |||
| 11972 | "y : rank-1 array('F') with bounds (ly)"; | |||
| 11973 | /* extern void F_FUNC(chemv,CHEMV)(char*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float*, complex_float*,F_INT* ); */ | |||
| 11974 | static PyObject *f2py_rout__fblas_chemv(const PyObject *capi_self, | |||
| 11975 | PyObject *capi_args, | |||
| 11976 | PyObject *capi_keywds, | |||
| 11977 | void (*f2py_func)(char*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* )) { | |||
| 11978 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 11979 | volatile int f2py_success = 1; | |||
| 11980 | /*decl*/ | |||
| 11981 | ||||
| 11982 | int n = 0; | |||
| 11983 | complex_float alpha; | |||
| 11984 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 11985 | complex_float *a = NULL((void*)0); | |||
| 11986 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 11987 | const int a_Rank = 2; | |||
| 11988 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 11989 | int capi_a_intent = 0; | |||
| 11990 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 11991 | complex_float *x = NULL((void*)0); | |||
| 11992 | npy_intp x_Dims[1] = {-1}; | |||
| 11993 | const int x_Rank = 1; | |||
| 11994 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 11995 | int capi_x_intent = 0; | |||
| 11996 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 11997 | complex_float beta; | |||
| 11998 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 11999 | complex_float *y = NULL((void*)0); | |||
| 12000 | npy_intp y_Dims[1] = {-1}; | |||
| 12001 | const int y_Rank = 1; | |||
| 12002 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 12003 | int capi_y_intent = 0; | |||
| 12004 | int capi_overwrite_y = 0; | |||
| 12005 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 12006 | int offx = 0; | |||
| 12007 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 12008 | int incx = 0; | |||
| 12009 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 12010 | int offy = 0; | |||
| 12011 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 12012 | int incy = 0; | |||
| 12013 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 12014 | int lower = 0; | |||
| 12015 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 12016 | int ly = 0; | |||
| 12017 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","lower","overwrite_y",NULL((void*)0)}; | |||
| 12018 | ||||
| 12019 | /*routdebugenter*/ | |||
| 12020 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12021 | f2py_start_clock(); | |||
| 12022 | #endif | |||
| 12023 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 12024 | "OOO|OOOOOOOi:_fblas.chemv",\ | |||
| 12025 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 12026 | return NULL((void*)0); | |||
| 12027 | /*frompyobj*/ | |||
| 12028 | /* Processing variable lower */ | |||
| 12029 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 12030 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.chemv() 7th keyword (lower) can't be converted to int"); | |||
| 12031 | if (f2py_success) { | |||
| 12032 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","chemv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chemv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12033 | /* Processing variable incx */ | |||
| 12034 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 12035 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.chemv() 4th keyword (incx) can't be converted to int"); | |||
| 12036 | if (f2py_success) { | |||
| 12037 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","chemv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chemv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12038 | /* Processing variable incy */ | |||
| 12039 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 12040 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.chemv() 6th keyword (incy) can't be converted to int"); | |||
| 12041 | if (f2py_success) { | |||
| 12042 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","chemv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chemv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12043 | /* Processing variable alpha */ | |||
| 12044 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.chemv() 1st argument (alpha) can't be converted to complex_float"); | |||
| 12045 | if (f2py_success) { | |||
| 12046 | /* Processing variable beta */ | |||
| 12047 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 12048 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.chemv() 1st keyword (beta) can't be converted to complex_float"); | |||
| 12049 | if (f2py_success) { | |||
| 12050 | /* Processing variable a */ | |||
| 12051 | ; | |||
| 12052 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 12053 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 12054 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 12055 | if (!PyErr_Occurred()) | |||
| 12056 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.chemv to C/Fortran array" ); | |||
| 12057 | } else { | |||
| 12058 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 12059 | ||||
| 12060 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 12061 | /* Processing variable offx */ | |||
| 12062 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 12063 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.chemv() 3rd keyword (offx) can't be converted to int"); | |||
| 12064 | if (f2py_success) { | |||
| 12065 | /* Processing variable offy */ | |||
| 12066 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 12067 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.chemv() 5th keyword (offy) can't be converted to int"); | |||
| 12068 | if (f2py_success) { | |||
| 12069 | /* Processing variable n */ | |||
| 12070 | n = shape(a,0)a_Dims[0]; | |||
| 12071 | /* Processing variable x */ | |||
| 12072 | ; | |||
| 12073 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 12074 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 12075 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 12076 | if (!PyErr_Occurred()) | |||
| 12077 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.chemv to C/Fortran array" ); | |||
| 12078 | } else { | |||
| 12079 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 12080 | ||||
| 12081 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 12082 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 12083 | /* Processing variable ly */ | |||
| 12084 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 12085 | /* Processing variable y */ | |||
| 12086 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 12087 | y_Dims[0]=ly; | |||
| 12088 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 12089 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 12090 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 12091 | if (!PyErr_Occurred()) | |||
| 12092 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.chemv to C/Fortran array" ); | |||
| 12093 | } else { | |||
| 12094 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 12095 | ||||
| 12096 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""2nd keyword y" ); } else { | |||
| 12097 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 12098 | /*end of frompyobj*/ | |||
| 12099 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12100 | f2py_start_call_clock(); | |||
| 12101 | #endif | |||
| 12102 | /*callfortranroutine*/ | |||
| 12103 | (*f2py_func)((lower?"L":"U"),&n,&alpha,a,&n,x+offx,&incx,&beta, y+offy,&incy) ; | |||
| 12104 | /*(*f2py_func)(&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&lower,&ly);*/ | |||
| 12105 | if (PyErr_Occurred()) | |||
| 12106 | f2py_success = 0; | |||
| 12107 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12108 | f2py_stop_call_clock(); | |||
| 12109 | #endif | |||
| 12110 | /*end of callfortranroutine*/ | |||
| 12111 | if (f2py_success) { | |||
| 12112 | /*pyobjfrom*/ | |||
| 12113 | /*end of pyobjfrom*/ | |||
| 12114 | CFUNCSMESS("Building return value.\n"); | |||
| 12115 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 12116 | /*closepyobjfrom*/ | |||
| 12117 | /*end of closepyobjfrom*/ | |||
| 12118 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 12119 | /*cleanupfrompyobj*/ | |||
| 12120 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 12121 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 12122 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 12123 | /* End of cleaning variable y */ | |||
| 12124 | /* End of cleaning variable ly */ | |||
| 12125 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 12126 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 12127 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 12128 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 12129 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 12130 | /* End of cleaning variable x */ | |||
| 12131 | /* End of cleaning variable n */ | |||
| 12132 | } /*if (f2py_success) of offy*/ | |||
| 12133 | /* End of cleaning variable offy */ | |||
| 12134 | } /*if (f2py_success) of offx*/ | |||
| 12135 | /* End of cleaning variable offx */ | |||
| 12136 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 12137 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 12138 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 12139 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 12140 | /* End of cleaning variable a */ | |||
| 12141 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 12142 | /* End of cleaning variable beta */ | |||
| 12143 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 12144 | /* End of cleaning variable alpha */ | |||
| 12145 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 12146 | } /*if (f2py_success) of incy*/ | |||
| 12147 | /* End of cleaning variable incy */ | |||
| 12148 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 12149 | } /*if (f2py_success) of incx*/ | |||
| 12150 | /* End of cleaning variable incx */ | |||
| 12151 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 12152 | } /*if (f2py_success) of lower*/ | |||
| 12153 | /* End of cleaning variable lower */ | |||
| 12154 | /*end of cleanupfrompyobj*/ | |||
| 12155 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 12156 | /*routdebugfailure*/ | |||
| 12157 | } else { | |||
| 12158 | /*routdebugleave*/ | |||
| 12159 | } | |||
| 12160 | CFUNCSMESS("Freeing memory.\n"); | |||
| 12161 | /*freemem*/ | |||
| 12162 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12163 | f2py_stop_clock(); | |||
| 12164 | #endif | |||
| 12165 | return capi_buildvalue; | |||
| 12166 | } | |||
| 12167 | /******************************** end of chemv ********************************/ | |||
| 12168 | ||||
| 12169 | /*********************************** zhemv ***********************************/ | |||
| 12170 | static char doc_f2py_rout__fblas_zhemv[] = "\ | |||
| 12171 | y = zhemv(alpha,a,x,[beta,y,offx,incx,offy,incy,lower,overwrite_y])\n\nWrapper for ``zhemv``.\ | |||
| 12172 | \n\nParameters\n----------\n" | |||
| 12173 | "alpha : input complex\n" | |||
| 12174 | "a : input rank-2 array('D') with bounds (n,n)\n" | |||
| 12175 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 12176 | "\nOther Parameters\n----------------\n" | |||
| 12177 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 12178 | "y : input rank-1 array('D') with bounds (ly)\n" | |||
| 12179 | "overwrite_y : input int, optional\n Default: 0\n" | |||
| 12180 | "offx : input int, optional\n Default: 0\n" | |||
| 12181 | "incx : input int, optional\n Default: 1\n" | |||
| 12182 | "offy : input int, optional\n Default: 0\n" | |||
| 12183 | "incy : input int, optional\n Default: 1\n" | |||
| 12184 | "lower : input int, optional\n Default: 0\n" | |||
| 12185 | "\nReturns\n-------\n" | |||
| 12186 | "y : rank-1 array('D') with bounds (ly)"; | |||
| 12187 | /* extern void F_FUNC(zhemv,ZHEMV)(char*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double*, complex_double*,F_INT* ); */ | |||
| 12188 | static PyObject *f2py_rout__fblas_zhemv(const PyObject *capi_self, | |||
| 12189 | PyObject *capi_args, | |||
| 12190 | PyObject *capi_keywds, | |||
| 12191 | void (*f2py_func)(char*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* )) { | |||
| 12192 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 12193 | volatile int f2py_success = 1; | |||
| 12194 | /*decl*/ | |||
| 12195 | ||||
| 12196 | int n = 0; | |||
| 12197 | complex_double alpha; | |||
| 12198 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 12199 | complex_double *a = NULL((void*)0); | |||
| 12200 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 12201 | const int a_Rank = 2; | |||
| 12202 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 12203 | int capi_a_intent = 0; | |||
| 12204 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 12205 | complex_double *x = NULL((void*)0); | |||
| 12206 | npy_intp x_Dims[1] = {-1}; | |||
| 12207 | const int x_Rank = 1; | |||
| 12208 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 12209 | int capi_x_intent = 0; | |||
| 12210 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 12211 | complex_double beta; | |||
| 12212 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 12213 | complex_double *y = NULL((void*)0); | |||
| 12214 | npy_intp y_Dims[1] = {-1}; | |||
| 12215 | const int y_Rank = 1; | |||
| 12216 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 12217 | int capi_y_intent = 0; | |||
| 12218 | int capi_overwrite_y = 0; | |||
| 12219 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 12220 | int offx = 0; | |||
| 12221 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 12222 | int incx = 0; | |||
| 12223 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 12224 | int offy = 0; | |||
| 12225 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 12226 | int incy = 0; | |||
| 12227 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 12228 | int lower = 0; | |||
| 12229 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 12230 | int ly = 0; | |||
| 12231 | static char *capi_kwlist[] = {"alpha","a","x","beta","y","offx","incx","offy","incy","lower","overwrite_y",NULL((void*)0)}; | |||
| 12232 | ||||
| 12233 | /*routdebugenter*/ | |||
| 12234 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12235 | f2py_start_clock(); | |||
| 12236 | #endif | |||
| 12237 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 12238 | "OOO|OOOOOOOi:_fblas.zhemv",\ | |||
| 12239 | capi_kwlist,&alpha_capi,&a_capi,&x_capi,&beta_capi,&y_capi,&offx_capi,&incx_capi,&offy_capi,&incy_capi,&lower_capi,&capi_overwrite_y)) | |||
| 12240 | return NULL((void*)0); | |||
| 12241 | /*frompyobj*/ | |||
| 12242 | /* Processing variable lower */ | |||
| 12243 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 12244 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zhemv() 7th keyword (lower) can't be converted to int"); | |||
| 12245 | if (f2py_success) { | |||
| 12246 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","7th keyword lower","zhemv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhemv:lower=%d", "(""lower==0||lower==1"") failed for " "7th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12247 | /* Processing variable incx */ | |||
| 12248 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 12249 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zhemv() 4th keyword (incx) can't be converted to int"); | |||
| 12250 | if (f2py_success) { | |||
| 12251 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","4th keyword incx","zhemv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhemv:incx=%d", "(""incx>0||incx<0"") failed for " "4th keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12252 | /* Processing variable incy */ | |||
| 12253 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 12254 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zhemv() 6th keyword (incy) can't be converted to int"); | |||
| 12255 | if (f2py_success) { | |||
| 12256 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","6th keyword incy","zhemv:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhemv:incy=%d", "(""incy>0||incy<0"") failed for " "6th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12257 | /* Processing variable alpha */ | |||
| 12258 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zhemv() 1st argument (alpha) can't be converted to complex_double"); | |||
| 12259 | if (f2py_success) { | |||
| 12260 | /* Processing variable beta */ | |||
| 12261 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 12262 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zhemv() 1st keyword (beta) can't be converted to complex_double"); | |||
| 12263 | if (f2py_success) { | |||
| 12264 | /* Processing variable a */ | |||
| 12265 | ; | |||
| 12266 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 12267 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 12268 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 12269 | if (!PyErr_Occurred()) | |||
| 12270 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zhemv to C/Fortran array" ); | |||
| 12271 | } else { | |||
| 12272 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 12273 | ||||
| 12274 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 12275 | /* Processing variable offx */ | |||
| 12276 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 12277 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zhemv() 3rd keyword (offx) can't be converted to int"); | |||
| 12278 | if (f2py_success) { | |||
| 12279 | /* Processing variable offy */ | |||
| 12280 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 12281 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zhemv() 5th keyword (offy) can't be converted to int"); | |||
| 12282 | if (f2py_success) { | |||
| 12283 | /* Processing variable n */ | |||
| 12284 | n = shape(a,0)a_Dims[0]; | |||
| 12285 | /* Processing variable x */ | |||
| 12286 | ; | |||
| 12287 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 12288 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 12289 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 12290 | if (!PyErr_Occurred()) | |||
| 12291 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.zhemv to C/Fortran array" ); | |||
| 12292 | } else { | |||
| 12293 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 12294 | ||||
| 12295 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 12296 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 12297 | /* Processing variable ly */ | |||
| 12298 | ly = (y_capi==Py_None(&_Py_NoneStruct)?1+offy+(n-1)*abs(incy):-1); | |||
| 12299 | /* Processing variable y */ | |||
| 12300 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 12301 | y_Dims[0]=ly; | |||
| 12302 | capi_y_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 12303 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 12304 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 12305 | if (!PyErr_Occurred()) | |||
| 12306 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `y' of _fblas.zhemv to C/Fortran array" ); | |||
| 12307 | } else { | |||
| 12308 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 12309 | ||||
| 12310 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","2nd keyword y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""2nd keyword y" ); } else { | |||
| 12311 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","2nd keyword y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "2nd keyword y"); } else { | |||
| 12312 | /*end of frompyobj*/ | |||
| 12313 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12314 | f2py_start_call_clock(); | |||
| 12315 | #endif | |||
| 12316 | /*callfortranroutine*/ | |||
| 12317 | (*f2py_func)((lower?"L":"U"),&n,&alpha,a,&n,x+offx,&incx,&beta, y+offy,&incy) ; | |||
| 12318 | /*(*f2py_func)(&n,&alpha,a,x,&beta,y,&offx,&incx,&offy,&incy,&lower,&ly);*/ | |||
| 12319 | if (PyErr_Occurred()) | |||
| 12320 | f2py_success = 0; | |||
| 12321 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12322 | f2py_stop_call_clock(); | |||
| 12323 | #endif | |||
| 12324 | /*end of callfortranroutine*/ | |||
| 12325 | if (f2py_success) { | |||
| 12326 | /*pyobjfrom*/ | |||
| 12327 | /*end of pyobjfrom*/ | |||
| 12328 | CFUNCSMESS("Building return value.\n"); | |||
| 12329 | capi_buildvalue = Py_BuildValue("N",capi_y_tmp); | |||
| 12330 | /*closepyobjfrom*/ | |||
| 12331 | /*end of closepyobjfrom*/ | |||
| 12332 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 12333 | /*cleanupfrompyobj*/ | |||
| 12334 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 12335 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 12336 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 12337 | /* End of cleaning variable y */ | |||
| 12338 | /* End of cleaning variable ly */ | |||
| 12339 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 12340 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 12341 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 12342 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 12343 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 12344 | /* End of cleaning variable x */ | |||
| 12345 | /* End of cleaning variable n */ | |||
| 12346 | } /*if (f2py_success) of offy*/ | |||
| 12347 | /* End of cleaning variable offy */ | |||
| 12348 | } /*if (f2py_success) of offx*/ | |||
| 12349 | /* End of cleaning variable offx */ | |||
| 12350 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 12351 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 12352 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 12353 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 12354 | /* End of cleaning variable a */ | |||
| 12355 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 12356 | /* End of cleaning variable beta */ | |||
| 12357 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 12358 | /* End of cleaning variable alpha */ | |||
| 12359 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 12360 | } /*if (f2py_success) of incy*/ | |||
| 12361 | /* End of cleaning variable incy */ | |||
| 12362 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 12363 | } /*if (f2py_success) of incx*/ | |||
| 12364 | /* End of cleaning variable incx */ | |||
| 12365 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 12366 | } /*if (f2py_success) of lower*/ | |||
| 12367 | /* End of cleaning variable lower */ | |||
| 12368 | /*end of cleanupfrompyobj*/ | |||
| 12369 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 12370 | /*routdebugfailure*/ | |||
| 12371 | } else { | |||
| 12372 | /*routdebugleave*/ | |||
| 12373 | } | |||
| 12374 | CFUNCSMESS("Freeing memory.\n"); | |||
| 12375 | /*freemem*/ | |||
| 12376 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12377 | f2py_stop_clock(); | |||
| 12378 | #endif | |||
| 12379 | return capi_buildvalue; | |||
| 12380 | } | |||
| 12381 | /******************************** end of zhemv ********************************/ | |||
| 12382 | ||||
| 12383 | /************************************ sger ************************************/ | |||
| 12384 | static char doc_f2py_rout__fblas_sger[] = "\ | |||
| 12385 | a = sger(alpha,x,y,[incx,incy,a,overwrite_x,overwrite_y,overwrite_a])\n\nWrapper for ``sger``.\ | |||
| 12386 | \n\nParameters\n----------\n" | |||
| 12387 | "alpha : input float\n" | |||
| 12388 | "x : input rank-1 array('f') with bounds (m)\n" | |||
| 12389 | "y : input rank-1 array('f') with bounds (n)\n" | |||
| 12390 | "\nOther Parameters\n----------------\n" | |||
| 12391 | "overwrite_x : input int, optional\n Default: 1\n" | |||
| 12392 | "incx : input int, optional\n Default: 1\n" | |||
| 12393 | "overwrite_y : input int, optional\n Default: 1\n" | |||
| 12394 | "incy : input int, optional\n Default: 1\n" | |||
| 12395 | "a : input rank-2 array('f') with bounds (m,n), optional\n Default: 0.0\n" | |||
| 12396 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 12397 | "\nReturns\n-------\n" | |||
| 12398 | "a : rank-2 array('f') with bounds (m,n)"; | |||
| 12399 | /* extern void F_FUNC(sger,SGER)(int*,int*,float*,float*,int*,float*,int*,float*,int*); */ | |||
| 12400 | static PyObject *f2py_rout__fblas_sger(const PyObject *capi_self, | |||
| 12401 | PyObject *capi_args, | |||
| 12402 | PyObject *capi_keywds, | |||
| 12403 | void (*f2py_func)(int*,int*,float*,float*,int*,float*,int*,float*,int*)) { | |||
| 12404 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 12405 | volatile int f2py_success = 1; | |||
| 12406 | /*decl*/ | |||
| 12407 | ||||
| 12408 | int m = 0; | |||
| 12409 | int n = 0; | |||
| 12410 | float alpha = 0; | |||
| 12411 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 12412 | float *x = NULL((void*)0); | |||
| 12413 | npy_intp x_Dims[1] = {-1}; | |||
| 12414 | const int x_Rank = 1; | |||
| 12415 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 12416 | int capi_x_intent = 0; | |||
| 12417 | int capi_overwrite_x = 1; | |||
| 12418 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 12419 | int incx = 0; | |||
| 12420 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 12421 | float *y = NULL((void*)0); | |||
| 12422 | npy_intp y_Dims[1] = {-1}; | |||
| 12423 | const int y_Rank = 1; | |||
| 12424 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 12425 | int capi_y_intent = 0; | |||
| 12426 | int capi_overwrite_y = 1; | |||
| 12427 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 12428 | int incy = 0; | |||
| 12429 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 12430 | float *a = NULL((void*)0); | |||
| 12431 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 12432 | const int a_Rank = 2; | |||
| 12433 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 12434 | int capi_a_intent = 0; | |||
| 12435 | int capi_overwrite_a = 0; | |||
| 12436 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 12437 | int lda = 0; | |||
| 12438 | static char *capi_kwlist[] = {"alpha","x","y","incx","incy","a","overwrite_x","overwrite_y","overwrite_a",NULL((void*)0)}; | |||
| 12439 | ||||
| 12440 | /*routdebugenter*/ | |||
| 12441 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12442 | f2py_start_clock(); | |||
| 12443 | #endif | |||
| 12444 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 12445 | "OOO|OOOiii:_fblas.sger",\ | |||
| 12446 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&incx_capi,&incy_capi,&a_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_a)) | |||
| 12447 | return NULL((void*)0); | |||
| 12448 | /*frompyobj*/ | |||
| 12449 | /* Processing variable alpha */ | |||
| 12450 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sger() 1st argument (alpha) can't be converted to float"); | |||
| 12451 | if (f2py_success) { | |||
| 12452 | /* Processing variable x */ | |||
| 12453 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 12454 | ; | |||
| 12455 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 12456 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 12457 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 12458 | if (!PyErr_Occurred()) | |||
| 12459 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.sger to C/Fortran array" ); | |||
| 12460 | } else { | |||
| 12461 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 12462 | ||||
| 12463 | /* Processing variable incx */ | |||
| 12464 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 12465 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sger() 1st keyword (incx) can't be converted to int"); | |||
| 12466 | if (f2py_success) { | |||
| 12467 | CHECKSCALAR(incx==1||incx==-1,"incx==1||incx==-1","1st keyword incx","sger:incx=%d",incx)if (!(incx==1||incx==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sger:incx=%d", "(""incx==1||incx==-1"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12468 | /* Processing variable y */ | |||
| 12469 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 12470 | ; | |||
| 12471 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 12472 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 12473 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 12474 | if (!PyErr_Occurred()) | |||
| 12475 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.sger to C/Fortran array" ); | |||
| 12476 | } else { | |||
| 12477 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 12478 | ||||
| 12479 | /* Processing variable incy */ | |||
| 12480 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 12481 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sger() 2nd keyword (incy) can't be converted to int"); | |||
| 12482 | if (f2py_success) { | |||
| 12483 | CHECKSCALAR(incy==1||incy==-1,"incy==1||incy==-1","2nd keyword incy","sger:incy=%d",incy)if (!(incy==1||incy==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sger:incy=%d", "(""incy==1||incy==-1"") failed for " "2nd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12484 | /* Processing variable m */ | |||
| 12485 | m = len(x)x_Dims[0]; | |||
| 12486 | /* Processing variable n */ | |||
| 12487 | n = len(y)y_Dims[0]; | |||
| 12488 | /* Processing variable a */ | |||
| 12489 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 12490 | a_Dims[0]=m,a_Dims[1]=n; | |||
| 12491 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 12492 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 12493 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 12494 | if (!PyErr_Occurred()) | |||
| 12495 | PyErr_SetString(_fblas_error,"failed in converting 3rd keyword `a' of _fblas.sger to C/Fortran array" ); | |||
| 12496 | } else { | |||
| 12497 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 12498 | ||||
| 12499 | if (a_capi == Py_None(&_Py_NoneStruct)) { | |||
| 12500 | ||||
| 12501 | ||||
| 12502 | int *_i,capi_i=0; | |||
| 12503 | CFUNCSMESS("sger: Initializing a=0.0\n"); | |||
| 12504 | if (initforcomb(PyArray_DIMS(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->dimensions),PyArray_NDIM(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->nd),1)) { | |||
| 12505 | while ((_i = nextforcomb())) | |||
| 12506 | a[capi_i++] = 0.0; /* fortran way */ | |||
| 12507 | } else { | |||
| 12508 | if (!PyErr_Occurred()) | |||
| 12509 | PyErr_SetString(_fblas_error,"Initialization of 3rd keyword a failed (initforcomb)."); | |||
| 12510 | f2py_success = 0; | |||
| 12511 | } | |||
| 12512 | } | |||
| 12513 | if (f2py_success) { | |||
| 12514 | /* Processing variable lda */ | |||
| 12515 | lda = m; | |||
| 12516 | /*end of frompyobj*/ | |||
| 12517 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12518 | f2py_start_call_clock(); | |||
| 12519 | #endif | |||
| 12520 | /*callfortranroutine*/ | |||
| 12521 | (*f2py_func)(&m,&n,&alpha,x,&incx,y,&incy,a,&lda); | |||
| 12522 | if (PyErr_Occurred()) | |||
| 12523 | f2py_success = 0; | |||
| 12524 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12525 | f2py_stop_call_clock(); | |||
| 12526 | #endif | |||
| 12527 | /*end of callfortranroutine*/ | |||
| 12528 | if (f2py_success) { | |||
| 12529 | /*pyobjfrom*/ | |||
| 12530 | /*end of pyobjfrom*/ | |||
| 12531 | CFUNCSMESS("Building return value.\n"); | |||
| 12532 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 12533 | /*closepyobjfrom*/ | |||
| 12534 | /*end of closepyobjfrom*/ | |||
| 12535 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 12536 | /*cleanupfrompyobj*/ | |||
| 12537 | /* End of cleaning variable lda */ | |||
| 12538 | } /*if (f2py_success) of a init*/ | |||
| 12539 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 12540 | /* End of cleaning variable a */ | |||
| 12541 | /* End of cleaning variable n */ | |||
| 12542 | /* End of cleaning variable m */ | |||
| 12543 | } /*CHECKSCALAR(incy==1||incy==-1)*/ | |||
| 12544 | } /*if (f2py_success) of incy*/ | |||
| 12545 | /* End of cleaning variable incy */ | |||
| 12546 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 12547 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 12548 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 12549 | /* End of cleaning variable y */ | |||
| 12550 | } /*CHECKSCALAR(incx==1||incx==-1)*/ | |||
| 12551 | } /*if (f2py_success) of incx*/ | |||
| 12552 | /* End of cleaning variable incx */ | |||
| 12553 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 12554 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 12555 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 12556 | /* End of cleaning variable x */ | |||
| 12557 | } /*if (f2py_success) of alpha*/ | |||
| 12558 | /* End of cleaning variable alpha */ | |||
| 12559 | /*end of cleanupfrompyobj*/ | |||
| 12560 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 12561 | /*routdebugfailure*/ | |||
| 12562 | } else { | |||
| 12563 | /*routdebugleave*/ | |||
| 12564 | } | |||
| 12565 | CFUNCSMESS("Freeing memory.\n"); | |||
| 12566 | /*freemem*/ | |||
| 12567 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12568 | f2py_stop_clock(); | |||
| 12569 | #endif | |||
| 12570 | return capi_buildvalue; | |||
| 12571 | } | |||
| 12572 | /******************************** end of sger ********************************/ | |||
| 12573 | ||||
| 12574 | /************************************ dger ************************************/ | |||
| 12575 | static char doc_f2py_rout__fblas_dger[] = "\ | |||
| 12576 | a = dger(alpha,x,y,[incx,incy,a,overwrite_x,overwrite_y,overwrite_a])\n\nWrapper for ``dger``.\ | |||
| 12577 | \n\nParameters\n----------\n" | |||
| 12578 | "alpha : input float\n" | |||
| 12579 | "x : input rank-1 array('d') with bounds (m)\n" | |||
| 12580 | "y : input rank-1 array('d') with bounds (n)\n" | |||
| 12581 | "\nOther Parameters\n----------------\n" | |||
| 12582 | "overwrite_x : input int, optional\n Default: 1\n" | |||
| 12583 | "incx : input int, optional\n Default: 1\n" | |||
| 12584 | "overwrite_y : input int, optional\n Default: 1\n" | |||
| 12585 | "incy : input int, optional\n Default: 1\n" | |||
| 12586 | "a : input rank-2 array('d') with bounds (m,n), optional\n Default: 0.0\n" | |||
| 12587 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 12588 | "\nReturns\n-------\n" | |||
| 12589 | "a : rank-2 array('d') with bounds (m,n)"; | |||
| 12590 | /* extern void F_FUNC(dger,DGER)(int*,int*,double*,double*,int*,double*,int*,double*,int*); */ | |||
| 12591 | static PyObject *f2py_rout__fblas_dger(const PyObject *capi_self, | |||
| 12592 | PyObject *capi_args, | |||
| 12593 | PyObject *capi_keywds, | |||
| 12594 | void (*f2py_func)(int*,int*,double*,double*,int*,double*,int*,double*,int*)) { | |||
| 12595 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 12596 | volatile int f2py_success = 1; | |||
| 12597 | /*decl*/ | |||
| 12598 | ||||
| 12599 | int m = 0; | |||
| 12600 | int n = 0; | |||
| 12601 | double alpha = 0; | |||
| 12602 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 12603 | double *x = NULL((void*)0); | |||
| 12604 | npy_intp x_Dims[1] = {-1}; | |||
| 12605 | const int x_Rank = 1; | |||
| 12606 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 12607 | int capi_x_intent = 0; | |||
| 12608 | int capi_overwrite_x = 1; | |||
| 12609 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 12610 | int incx = 0; | |||
| 12611 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 12612 | double *y = NULL((void*)0); | |||
| 12613 | npy_intp y_Dims[1] = {-1}; | |||
| 12614 | const int y_Rank = 1; | |||
| 12615 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 12616 | int capi_y_intent = 0; | |||
| 12617 | int capi_overwrite_y = 1; | |||
| 12618 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 12619 | int incy = 0; | |||
| 12620 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 12621 | double *a = NULL((void*)0); | |||
| 12622 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 12623 | const int a_Rank = 2; | |||
| 12624 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 12625 | int capi_a_intent = 0; | |||
| 12626 | int capi_overwrite_a = 0; | |||
| 12627 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 12628 | int lda = 0; | |||
| 12629 | static char *capi_kwlist[] = {"alpha","x","y","incx","incy","a","overwrite_x","overwrite_y","overwrite_a",NULL((void*)0)}; | |||
| 12630 | ||||
| 12631 | /*routdebugenter*/ | |||
| 12632 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12633 | f2py_start_clock(); | |||
| 12634 | #endif | |||
| 12635 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 12636 | "OOO|OOOiii:_fblas.dger",\ | |||
| 12637 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&incx_capi,&incy_capi,&a_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_a)) | |||
| 12638 | return NULL((void*)0); | |||
| 12639 | /*frompyobj*/ | |||
| 12640 | /* Processing variable alpha */ | |||
| 12641 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dger() 1st argument (alpha) can't be converted to double"); | |||
| 12642 | if (f2py_success) { | |||
| 12643 | /* Processing variable x */ | |||
| 12644 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 12645 | ; | |||
| 12646 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 12647 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 12648 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 12649 | if (!PyErr_Occurred()) | |||
| 12650 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.dger to C/Fortran array" ); | |||
| 12651 | } else { | |||
| 12652 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 12653 | ||||
| 12654 | /* Processing variable incx */ | |||
| 12655 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 12656 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dger() 1st keyword (incx) can't be converted to int"); | |||
| 12657 | if (f2py_success) { | |||
| 12658 | CHECKSCALAR(incx==1||incx==-1,"incx==1||incx==-1","1st keyword incx","dger:incx=%d",incx)if (!(incx==1||incx==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dger:incx=%d", "(""incx==1||incx==-1"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12659 | /* Processing variable y */ | |||
| 12660 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 12661 | ; | |||
| 12662 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 12663 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 12664 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 12665 | if (!PyErr_Occurred()) | |||
| 12666 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.dger to C/Fortran array" ); | |||
| 12667 | } else { | |||
| 12668 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 12669 | ||||
| 12670 | /* Processing variable incy */ | |||
| 12671 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 12672 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dger() 2nd keyword (incy) can't be converted to int"); | |||
| 12673 | if (f2py_success) { | |||
| 12674 | CHECKSCALAR(incy==1||incy==-1,"incy==1||incy==-1","2nd keyword incy","dger:incy=%d",incy)if (!(incy==1||incy==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dger:incy=%d", "(""incy==1||incy==-1"") failed for " "2nd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12675 | /* Processing variable m */ | |||
| 12676 | m = len(x)x_Dims[0]; | |||
| 12677 | /* Processing variable n */ | |||
| 12678 | n = len(y)y_Dims[0]; | |||
| 12679 | /* Processing variable a */ | |||
| 12680 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 12681 | a_Dims[0]=m,a_Dims[1]=n; | |||
| 12682 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 12683 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 12684 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 12685 | if (!PyErr_Occurred()) | |||
| 12686 | PyErr_SetString(_fblas_error,"failed in converting 3rd keyword `a' of _fblas.dger to C/Fortran array" ); | |||
| 12687 | } else { | |||
| 12688 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 12689 | ||||
| 12690 | if (a_capi == Py_None(&_Py_NoneStruct)) { | |||
| 12691 | ||||
| 12692 | ||||
| 12693 | int *_i,capi_i=0; | |||
| 12694 | CFUNCSMESS("dger: Initializing a=0.0\n"); | |||
| 12695 | if (initforcomb(PyArray_DIMS(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->dimensions),PyArray_NDIM(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->nd),1)) { | |||
| 12696 | while ((_i = nextforcomb())) | |||
| 12697 | a[capi_i++] = 0.0; /* fortran way */ | |||
| 12698 | } else { | |||
| 12699 | if (!PyErr_Occurred()) | |||
| 12700 | PyErr_SetString(_fblas_error,"Initialization of 3rd keyword a failed (initforcomb)."); | |||
| 12701 | f2py_success = 0; | |||
| 12702 | } | |||
| 12703 | } | |||
| 12704 | if (f2py_success) { | |||
| 12705 | /* Processing variable lda */ | |||
| 12706 | lda = m; | |||
| 12707 | /*end of frompyobj*/ | |||
| 12708 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12709 | f2py_start_call_clock(); | |||
| 12710 | #endif | |||
| 12711 | /*callfortranroutine*/ | |||
| 12712 | (*f2py_func)(&m,&n,&alpha,x,&incx,y,&incy,a,&lda); | |||
| 12713 | if (PyErr_Occurred()) | |||
| 12714 | f2py_success = 0; | |||
| 12715 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12716 | f2py_stop_call_clock(); | |||
| 12717 | #endif | |||
| 12718 | /*end of callfortranroutine*/ | |||
| 12719 | if (f2py_success) { | |||
| 12720 | /*pyobjfrom*/ | |||
| 12721 | /*end of pyobjfrom*/ | |||
| 12722 | CFUNCSMESS("Building return value.\n"); | |||
| 12723 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 12724 | /*closepyobjfrom*/ | |||
| 12725 | /*end of closepyobjfrom*/ | |||
| 12726 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 12727 | /*cleanupfrompyobj*/ | |||
| 12728 | /* End of cleaning variable lda */ | |||
| 12729 | } /*if (f2py_success) of a init*/ | |||
| 12730 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 12731 | /* End of cleaning variable a */ | |||
| 12732 | /* End of cleaning variable n */ | |||
| 12733 | /* End of cleaning variable m */ | |||
| 12734 | } /*CHECKSCALAR(incy==1||incy==-1)*/ | |||
| 12735 | } /*if (f2py_success) of incy*/ | |||
| 12736 | /* End of cleaning variable incy */ | |||
| 12737 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 12738 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 12739 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 12740 | /* End of cleaning variable y */ | |||
| 12741 | } /*CHECKSCALAR(incx==1||incx==-1)*/ | |||
| 12742 | } /*if (f2py_success) of incx*/ | |||
| 12743 | /* End of cleaning variable incx */ | |||
| 12744 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 12745 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 12746 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 12747 | /* End of cleaning variable x */ | |||
| 12748 | } /*if (f2py_success) of alpha*/ | |||
| 12749 | /* End of cleaning variable alpha */ | |||
| 12750 | /*end of cleanupfrompyobj*/ | |||
| 12751 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 12752 | /*routdebugfailure*/ | |||
| 12753 | } else { | |||
| 12754 | /*routdebugleave*/ | |||
| 12755 | } | |||
| 12756 | CFUNCSMESS("Freeing memory.\n"); | |||
| 12757 | /*freemem*/ | |||
| 12758 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12759 | f2py_stop_clock(); | |||
| 12760 | #endif | |||
| 12761 | return capi_buildvalue; | |||
| 12762 | } | |||
| 12763 | /******************************** end of dger ********************************/ | |||
| 12764 | ||||
| 12765 | /*********************************** cgeru ***********************************/ | |||
| 12766 | static char doc_f2py_rout__fblas_cgeru[] = "\ | |||
| 12767 | a = cgeru(alpha,x,y,[incx,incy,a,overwrite_x,overwrite_y,overwrite_a])\n\nWrapper for ``cgeru``.\ | |||
| 12768 | \n\nParameters\n----------\n" | |||
| 12769 | "alpha : input complex\n" | |||
| 12770 | "x : input rank-1 array('F') with bounds (m)\n" | |||
| 12771 | "y : input rank-1 array('F') with bounds (n)\n" | |||
| 12772 | "\nOther Parameters\n----------------\n" | |||
| 12773 | "overwrite_x : input int, optional\n Default: 1\n" | |||
| 12774 | "incx : input int, optional\n Default: 1\n" | |||
| 12775 | "overwrite_y : input int, optional\n Default: 1\n" | |||
| 12776 | "incy : input int, optional\n Default: 1\n" | |||
| 12777 | "a : input rank-2 array('F') with bounds (m,n), optional\n Default: (0.0,0.0)\n" | |||
| 12778 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 12779 | "\nReturns\n-------\n" | |||
| 12780 | "a : rank-2 array('F') with bounds (m,n)"; | |||
| 12781 | /* extern void F_FUNC(cgeru,CGERU)(int*,int*,complex_float*,complex_float*,int*,complex_float*,int*,complex_float*,int*); */ | |||
| 12782 | static PyObject *f2py_rout__fblas_cgeru(const PyObject *capi_self, | |||
| 12783 | PyObject *capi_args, | |||
| 12784 | PyObject *capi_keywds, | |||
| 12785 | void (*f2py_func)(int*,int*,complex_float*,complex_float*,int*,complex_float*,int*,complex_float*,int*)) { | |||
| 12786 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 12787 | volatile int f2py_success = 1; | |||
| 12788 | /*decl*/ | |||
| 12789 | ||||
| 12790 | int m = 0; | |||
| 12791 | int n = 0; | |||
| 12792 | complex_float alpha; | |||
| 12793 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 12794 | complex_float *x = NULL((void*)0); | |||
| 12795 | npy_intp x_Dims[1] = {-1}; | |||
| 12796 | const int x_Rank = 1; | |||
| 12797 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 12798 | int capi_x_intent = 0; | |||
| 12799 | int capi_overwrite_x = 1; | |||
| 12800 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 12801 | int incx = 0; | |||
| 12802 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 12803 | complex_float *y = NULL((void*)0); | |||
| 12804 | npy_intp y_Dims[1] = {-1}; | |||
| 12805 | const int y_Rank = 1; | |||
| 12806 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 12807 | int capi_y_intent = 0; | |||
| 12808 | int capi_overwrite_y = 1; | |||
| 12809 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 12810 | int incy = 0; | |||
| 12811 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 12812 | complex_float *a = NULL((void*)0); | |||
| 12813 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 12814 | const int a_Rank = 2; | |||
| 12815 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 12816 | int capi_a_intent = 0; | |||
| 12817 | int capi_overwrite_a = 0; | |||
| 12818 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 12819 | int lda = 0; | |||
| 12820 | static char *capi_kwlist[] = {"alpha","x","y","incx","incy","a","overwrite_x","overwrite_y","overwrite_a",NULL((void*)0)}; | |||
| 12821 | ||||
| 12822 | /*routdebugenter*/ | |||
| 12823 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12824 | f2py_start_clock(); | |||
| 12825 | #endif | |||
| 12826 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 12827 | "OOO|OOOiii:_fblas.cgeru",\ | |||
| 12828 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&incx_capi,&incy_capi,&a_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_a)) | |||
| 12829 | return NULL((void*)0); | |||
| 12830 | /*frompyobj*/ | |||
| 12831 | /* Processing variable alpha */ | |||
| 12832 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cgeru() 1st argument (alpha) can't be converted to complex_float"); | |||
| 12833 | if (f2py_success) { | |||
| 12834 | /* Processing variable x */ | |||
| 12835 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 12836 | ; | |||
| 12837 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 12838 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 12839 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 12840 | if (!PyErr_Occurred()) | |||
| 12841 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.cgeru to C/Fortran array" ); | |||
| 12842 | } else { | |||
| 12843 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 12844 | ||||
| 12845 | /* Processing variable incx */ | |||
| 12846 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 12847 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cgeru() 1st keyword (incx) can't be converted to int"); | |||
| 12848 | if (f2py_success) { | |||
| 12849 | CHECKSCALAR(incx==1||incx==-1,"incx==1||incx==-1","1st keyword incx","cgeru:incx=%d",incx)if (!(incx==1||incx==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgeru:incx=%d", "(""incx==1||incx==-1"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12850 | /* Processing variable y */ | |||
| 12851 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 12852 | ; | |||
| 12853 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 12854 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 12855 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 12856 | if (!PyErr_Occurred()) | |||
| 12857 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.cgeru to C/Fortran array" ); | |||
| 12858 | } else { | |||
| 12859 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 12860 | ||||
| 12861 | /* Processing variable incy */ | |||
| 12862 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 12863 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cgeru() 2nd keyword (incy) can't be converted to int"); | |||
| 12864 | if (f2py_success) { | |||
| 12865 | CHECKSCALAR(incy==1||incy==-1,"incy==1||incy==-1","2nd keyword incy","cgeru:incy=%d",incy)if (!(incy==1||incy==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgeru:incy=%d", "(""incy==1||incy==-1"") failed for " "2nd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 12866 | /* Processing variable m */ | |||
| 12867 | m = len(x)x_Dims[0]; | |||
| 12868 | /* Processing variable n */ | |||
| 12869 | n = len(y)y_Dims[0]; | |||
| 12870 | /* Processing variable a */ | |||
| 12871 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 12872 | a_Dims[0]=m,a_Dims[1]=n; | |||
| 12873 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 12874 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 12875 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 12876 | if (!PyErr_Occurred()) | |||
| 12877 | PyErr_SetString(_fblas_error,"failed in converting 3rd keyword `a' of _fblas.cgeru to C/Fortran array" ); | |||
| 12878 | } else { | |||
| 12879 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 12880 | ||||
| 12881 | if (a_capi == Py_None(&_Py_NoneStruct)) { | |||
| 12882 | ||||
| 12883 | complex_float capi_c; | |||
| 12884 | int *_i,capi_i=0; | |||
| 12885 | CFUNCSMESS("cgeru: Initializing a=(capi_c.r=0.0,capi_c.i=0.0,capi_c)\n"); | |||
| 12886 | if (initforcomb(PyArray_DIMS(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->dimensions),PyArray_NDIM(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->nd),1)) { | |||
| 12887 | while ((_i = nextforcomb())) | |||
| 12888 | a[capi_i++] = (capi_c.r=0.0,capi_c.i=0.0,capi_c); /* fortran way */ | |||
| 12889 | } else { | |||
| 12890 | if (!PyErr_Occurred()) | |||
| 12891 | PyErr_SetString(_fblas_error,"Initialization of 3rd keyword a failed (initforcomb)."); | |||
| 12892 | f2py_success = 0; | |||
| 12893 | } | |||
| 12894 | } | |||
| 12895 | if (f2py_success) { | |||
| 12896 | /* Processing variable lda */ | |||
| 12897 | lda = m; | |||
| 12898 | /*end of frompyobj*/ | |||
| 12899 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12900 | f2py_start_call_clock(); | |||
| 12901 | #endif | |||
| 12902 | /*callfortranroutine*/ | |||
| 12903 | (*f2py_func)(&m,&n,&alpha,x,&incx,y,&incy,a,&lda); | |||
| 12904 | if (PyErr_Occurred()) | |||
| 12905 | f2py_success = 0; | |||
| 12906 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12907 | f2py_stop_call_clock(); | |||
| 12908 | #endif | |||
| 12909 | /*end of callfortranroutine*/ | |||
| 12910 | if (f2py_success) { | |||
| 12911 | /*pyobjfrom*/ | |||
| 12912 | /*end of pyobjfrom*/ | |||
| 12913 | CFUNCSMESS("Building return value.\n"); | |||
| 12914 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 12915 | /*closepyobjfrom*/ | |||
| 12916 | /*end of closepyobjfrom*/ | |||
| 12917 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 12918 | /*cleanupfrompyobj*/ | |||
| 12919 | /* End of cleaning variable lda */ | |||
| 12920 | } /*if (f2py_success) of a init*/ | |||
| 12921 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 12922 | /* End of cleaning variable a */ | |||
| 12923 | /* End of cleaning variable n */ | |||
| 12924 | /* End of cleaning variable m */ | |||
| 12925 | } /*CHECKSCALAR(incy==1||incy==-1)*/ | |||
| 12926 | } /*if (f2py_success) of incy*/ | |||
| 12927 | /* End of cleaning variable incy */ | |||
| 12928 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 12929 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 12930 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 12931 | /* End of cleaning variable y */ | |||
| 12932 | } /*CHECKSCALAR(incx==1||incx==-1)*/ | |||
| 12933 | } /*if (f2py_success) of incx*/ | |||
| 12934 | /* End of cleaning variable incx */ | |||
| 12935 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 12936 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 12937 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 12938 | /* End of cleaning variable x */ | |||
| 12939 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 12940 | /* End of cleaning variable alpha */ | |||
| 12941 | /*end of cleanupfrompyobj*/ | |||
| 12942 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 12943 | /*routdebugfailure*/ | |||
| 12944 | } else { | |||
| 12945 | /*routdebugleave*/ | |||
| 12946 | } | |||
| 12947 | CFUNCSMESS("Freeing memory.\n"); | |||
| 12948 | /*freemem*/ | |||
| 12949 | #ifdef F2PY_REPORT_ATEXIT | |||
| 12950 | f2py_stop_clock(); | |||
| 12951 | #endif | |||
| 12952 | return capi_buildvalue; | |||
| 12953 | } | |||
| 12954 | /******************************** end of cgeru ********************************/ | |||
| 12955 | ||||
| 12956 | /*********************************** zgeru ***********************************/ | |||
| 12957 | static char doc_f2py_rout__fblas_zgeru[] = "\ | |||
| 12958 | a = zgeru(alpha,x,y,[incx,incy,a,overwrite_x,overwrite_y,overwrite_a])\n\nWrapper for ``zgeru``.\ | |||
| 12959 | \n\nParameters\n----------\n" | |||
| 12960 | "alpha : input complex\n" | |||
| 12961 | "x : input rank-1 array('D') with bounds (m)\n" | |||
| 12962 | "y : input rank-1 array('D') with bounds (n)\n" | |||
| 12963 | "\nOther Parameters\n----------------\n" | |||
| 12964 | "overwrite_x : input int, optional\n Default: 1\n" | |||
| 12965 | "incx : input int, optional\n Default: 1\n" | |||
| 12966 | "overwrite_y : input int, optional\n Default: 1\n" | |||
| 12967 | "incy : input int, optional\n Default: 1\n" | |||
| 12968 | "a : input rank-2 array('D') with bounds (m,n), optional\n Default: (0.0,0.0)\n" | |||
| 12969 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 12970 | "\nReturns\n-------\n" | |||
| 12971 | "a : rank-2 array('D') with bounds (m,n)"; | |||
| 12972 | /* extern void F_FUNC(zgeru,ZGERU)(int*,int*,complex_double*,complex_double*,int*,complex_double*,int*,complex_double*,int*); */ | |||
| 12973 | static PyObject *f2py_rout__fblas_zgeru(const PyObject *capi_self, | |||
| 12974 | PyObject *capi_args, | |||
| 12975 | PyObject *capi_keywds, | |||
| 12976 | void (*f2py_func)(int*,int*,complex_double*,complex_double*,int*,complex_double*,int*,complex_double*,int*)) { | |||
| 12977 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 12978 | volatile int f2py_success = 1; | |||
| 12979 | /*decl*/ | |||
| 12980 | ||||
| 12981 | int m = 0; | |||
| 12982 | int n = 0; | |||
| 12983 | complex_double alpha; | |||
| 12984 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 12985 | complex_double *x = NULL((void*)0); | |||
| 12986 | npy_intp x_Dims[1] = {-1}; | |||
| 12987 | const int x_Rank = 1; | |||
| 12988 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 12989 | int capi_x_intent = 0; | |||
| 12990 | int capi_overwrite_x = 1; | |||
| 12991 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 12992 | int incx = 0; | |||
| 12993 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 12994 | complex_double *y = NULL((void*)0); | |||
| 12995 | npy_intp y_Dims[1] = {-1}; | |||
| 12996 | const int y_Rank = 1; | |||
| 12997 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 12998 | int capi_y_intent = 0; | |||
| 12999 | int capi_overwrite_y = 1; | |||
| 13000 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 13001 | int incy = 0; | |||
| 13002 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 13003 | complex_double *a = NULL((void*)0); | |||
| 13004 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 13005 | const int a_Rank = 2; | |||
| 13006 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 13007 | int capi_a_intent = 0; | |||
| 13008 | int capi_overwrite_a = 0; | |||
| 13009 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 13010 | int lda = 0; | |||
| 13011 | static char *capi_kwlist[] = {"alpha","x","y","incx","incy","a","overwrite_x","overwrite_y","overwrite_a",NULL((void*)0)}; | |||
| 13012 | ||||
| 13013 | /*routdebugenter*/ | |||
| 13014 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13015 | f2py_start_clock(); | |||
| 13016 | #endif | |||
| 13017 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 13018 | "OOO|OOOiii:_fblas.zgeru",\ | |||
| 13019 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&incx_capi,&incy_capi,&a_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_a)) | |||
| 13020 | return NULL((void*)0); | |||
| 13021 | /*frompyobj*/ | |||
| 13022 | /* Processing variable alpha */ | |||
| 13023 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zgeru() 1st argument (alpha) can't be converted to complex_double"); | |||
| 13024 | if (f2py_success) { | |||
| 13025 | /* Processing variable x */ | |||
| 13026 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 13027 | ; | |||
| 13028 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 13029 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 13030 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 13031 | if (!PyErr_Occurred()) | |||
| 13032 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zgeru to C/Fortran array" ); | |||
| 13033 | } else { | |||
| 13034 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 13035 | ||||
| 13036 | /* Processing variable incx */ | |||
| 13037 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 13038 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zgeru() 1st keyword (incx) can't be converted to int"); | |||
| 13039 | if (f2py_success) { | |||
| 13040 | CHECKSCALAR(incx==1||incx==-1,"incx==1||incx==-1","1st keyword incx","zgeru:incx=%d",incx)if (!(incx==1||incx==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgeru:incx=%d", "(""incx==1||incx==-1"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13041 | /* Processing variable y */ | |||
| 13042 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 13043 | ; | |||
| 13044 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 13045 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 13046 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 13047 | if (!PyErr_Occurred()) | |||
| 13048 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.zgeru to C/Fortran array" ); | |||
| 13049 | } else { | |||
| 13050 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 13051 | ||||
| 13052 | /* Processing variable incy */ | |||
| 13053 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 13054 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zgeru() 2nd keyword (incy) can't be converted to int"); | |||
| 13055 | if (f2py_success) { | |||
| 13056 | CHECKSCALAR(incy==1||incy==-1,"incy==1||incy==-1","2nd keyword incy","zgeru:incy=%d",incy)if (!(incy==1||incy==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgeru:incy=%d", "(""incy==1||incy==-1"") failed for " "2nd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13057 | /* Processing variable m */ | |||
| 13058 | m = len(x)x_Dims[0]; | |||
| 13059 | /* Processing variable n */ | |||
| 13060 | n = len(y)y_Dims[0]; | |||
| 13061 | /* Processing variable a */ | |||
| 13062 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 13063 | a_Dims[0]=m,a_Dims[1]=n; | |||
| 13064 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 13065 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 13066 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 13067 | if (!PyErr_Occurred()) | |||
| 13068 | PyErr_SetString(_fblas_error,"failed in converting 3rd keyword `a' of _fblas.zgeru to C/Fortran array" ); | |||
| 13069 | } else { | |||
| 13070 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 13071 | ||||
| 13072 | if (a_capi == Py_None(&_Py_NoneStruct)) { | |||
| 13073 | ||||
| 13074 | complex_double capi_c; | |||
| 13075 | int *_i,capi_i=0; | |||
| 13076 | CFUNCSMESS("zgeru: Initializing a=(capi_c.r=0.0,capi_c.i=0.0,capi_c)\n"); | |||
| 13077 | if (initforcomb(PyArray_DIMS(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->dimensions),PyArray_NDIM(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->nd),1)) { | |||
| 13078 | while ((_i = nextforcomb())) | |||
| 13079 | a[capi_i++] = (capi_c.r=0.0,capi_c.i=0.0,capi_c); /* fortran way */ | |||
| 13080 | } else { | |||
| 13081 | if (!PyErr_Occurred()) | |||
| 13082 | PyErr_SetString(_fblas_error,"Initialization of 3rd keyword a failed (initforcomb)."); | |||
| 13083 | f2py_success = 0; | |||
| 13084 | } | |||
| 13085 | } | |||
| 13086 | if (f2py_success) { | |||
| 13087 | /* Processing variable lda */ | |||
| 13088 | lda = m; | |||
| 13089 | /*end of frompyobj*/ | |||
| 13090 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13091 | f2py_start_call_clock(); | |||
| 13092 | #endif | |||
| 13093 | /*callfortranroutine*/ | |||
| 13094 | (*f2py_func)(&m,&n,&alpha,x,&incx,y,&incy,a,&lda); | |||
| 13095 | if (PyErr_Occurred()) | |||
| 13096 | f2py_success = 0; | |||
| 13097 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13098 | f2py_stop_call_clock(); | |||
| 13099 | #endif | |||
| 13100 | /*end of callfortranroutine*/ | |||
| 13101 | if (f2py_success) { | |||
| 13102 | /*pyobjfrom*/ | |||
| 13103 | /*end of pyobjfrom*/ | |||
| 13104 | CFUNCSMESS("Building return value.\n"); | |||
| 13105 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 13106 | /*closepyobjfrom*/ | |||
| 13107 | /*end of closepyobjfrom*/ | |||
| 13108 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 13109 | /*cleanupfrompyobj*/ | |||
| 13110 | /* End of cleaning variable lda */ | |||
| 13111 | } /*if (f2py_success) of a init*/ | |||
| 13112 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 13113 | /* End of cleaning variable a */ | |||
| 13114 | /* End of cleaning variable n */ | |||
| 13115 | /* End of cleaning variable m */ | |||
| 13116 | } /*CHECKSCALAR(incy==1||incy==-1)*/ | |||
| 13117 | } /*if (f2py_success) of incy*/ | |||
| 13118 | /* End of cleaning variable incy */ | |||
| 13119 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 13120 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 13121 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 13122 | /* End of cleaning variable y */ | |||
| 13123 | } /*CHECKSCALAR(incx==1||incx==-1)*/ | |||
| 13124 | } /*if (f2py_success) of incx*/ | |||
| 13125 | /* End of cleaning variable incx */ | |||
| 13126 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 13127 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 13128 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 13129 | /* End of cleaning variable x */ | |||
| 13130 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 13131 | /* End of cleaning variable alpha */ | |||
| 13132 | /*end of cleanupfrompyobj*/ | |||
| 13133 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 13134 | /*routdebugfailure*/ | |||
| 13135 | } else { | |||
| 13136 | /*routdebugleave*/ | |||
| 13137 | } | |||
| 13138 | CFUNCSMESS("Freeing memory.\n"); | |||
| 13139 | /*freemem*/ | |||
| 13140 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13141 | f2py_stop_clock(); | |||
| 13142 | #endif | |||
| 13143 | return capi_buildvalue; | |||
| 13144 | } | |||
| 13145 | /******************************** end of zgeru ********************************/ | |||
| 13146 | ||||
| 13147 | /*********************************** cgerc ***********************************/ | |||
| 13148 | static char doc_f2py_rout__fblas_cgerc[] = "\ | |||
| 13149 | a = cgerc(alpha,x,y,[incx,incy,a,overwrite_x,overwrite_y,overwrite_a])\n\nWrapper for ``cgerc``.\ | |||
| 13150 | \n\nParameters\n----------\n" | |||
| 13151 | "alpha : input complex\n" | |||
| 13152 | "x : input rank-1 array('F') with bounds (m)\n" | |||
| 13153 | "y : input rank-1 array('F') with bounds (n)\n" | |||
| 13154 | "\nOther Parameters\n----------------\n" | |||
| 13155 | "overwrite_x : input int, optional\n Default: 1\n" | |||
| 13156 | "incx : input int, optional\n Default: 1\n" | |||
| 13157 | "overwrite_y : input int, optional\n Default: 1\n" | |||
| 13158 | "incy : input int, optional\n Default: 1\n" | |||
| 13159 | "a : input rank-2 array('F') with bounds (m,n), optional\n Default: (0.0,0.0)\n" | |||
| 13160 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 13161 | "\nReturns\n-------\n" | |||
| 13162 | "a : rank-2 array('F') with bounds (m,n)"; | |||
| 13163 | /* extern void F_FUNC(cgerc,CGERC)(int*,int*,complex_float*,complex_float*,int*,complex_float*,int*,complex_float*,int*); */ | |||
| 13164 | static PyObject *f2py_rout__fblas_cgerc(const PyObject *capi_self, | |||
| 13165 | PyObject *capi_args, | |||
| 13166 | PyObject *capi_keywds, | |||
| 13167 | void (*f2py_func)(int*,int*,complex_float*,complex_float*,int*,complex_float*,int*,complex_float*,int*)) { | |||
| 13168 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 13169 | volatile int f2py_success = 1; | |||
| 13170 | /*decl*/ | |||
| 13171 | ||||
| 13172 | int m = 0; | |||
| 13173 | int n = 0; | |||
| 13174 | complex_float alpha; | |||
| 13175 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 13176 | complex_float *x = NULL((void*)0); | |||
| 13177 | npy_intp x_Dims[1] = {-1}; | |||
| 13178 | const int x_Rank = 1; | |||
| 13179 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 13180 | int capi_x_intent = 0; | |||
| 13181 | int capi_overwrite_x = 1; | |||
| 13182 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 13183 | int incx = 0; | |||
| 13184 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 13185 | complex_float *y = NULL((void*)0); | |||
| 13186 | npy_intp y_Dims[1] = {-1}; | |||
| 13187 | const int y_Rank = 1; | |||
| 13188 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 13189 | int capi_y_intent = 0; | |||
| 13190 | int capi_overwrite_y = 1; | |||
| 13191 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 13192 | int incy = 0; | |||
| 13193 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 13194 | complex_float *a = NULL((void*)0); | |||
| 13195 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 13196 | const int a_Rank = 2; | |||
| 13197 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 13198 | int capi_a_intent = 0; | |||
| 13199 | int capi_overwrite_a = 0; | |||
| 13200 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 13201 | int lda = 0; | |||
| 13202 | static char *capi_kwlist[] = {"alpha","x","y","incx","incy","a","overwrite_x","overwrite_y","overwrite_a",NULL((void*)0)}; | |||
| 13203 | ||||
| 13204 | /*routdebugenter*/ | |||
| 13205 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13206 | f2py_start_clock(); | |||
| 13207 | #endif | |||
| 13208 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 13209 | "OOO|OOOiii:_fblas.cgerc",\ | |||
| 13210 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&incx_capi,&incy_capi,&a_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_a)) | |||
| 13211 | return NULL((void*)0); | |||
| 13212 | /*frompyobj*/ | |||
| 13213 | /* Processing variable alpha */ | |||
| 13214 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cgerc() 1st argument (alpha) can't be converted to complex_float"); | |||
| 13215 | if (f2py_success) { | |||
| 13216 | /* Processing variable x */ | |||
| 13217 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 13218 | ; | |||
| 13219 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 13220 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 13221 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 13222 | if (!PyErr_Occurred()) | |||
| 13223 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.cgerc to C/Fortran array" ); | |||
| 13224 | } else { | |||
| 13225 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 13226 | ||||
| 13227 | /* Processing variable incx */ | |||
| 13228 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 13229 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cgerc() 1st keyword (incx) can't be converted to int"); | |||
| 13230 | if (f2py_success) { | |||
| 13231 | CHECKSCALAR(incx==1||incx==-1,"incx==1||incx==-1","1st keyword incx","cgerc:incx=%d",incx)if (!(incx==1||incx==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgerc:incx=%d", "(""incx==1||incx==-1"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13232 | /* Processing variable y */ | |||
| 13233 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 13234 | ; | |||
| 13235 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 13236 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 13237 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 13238 | if (!PyErr_Occurred()) | |||
| 13239 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.cgerc to C/Fortran array" ); | |||
| 13240 | } else { | |||
| 13241 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 13242 | ||||
| 13243 | /* Processing variable incy */ | |||
| 13244 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 13245 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cgerc() 2nd keyword (incy) can't be converted to int"); | |||
| 13246 | if (f2py_success) { | |||
| 13247 | CHECKSCALAR(incy==1||incy==-1,"incy==1||incy==-1","2nd keyword incy","cgerc:incy=%d",incy)if (!(incy==1||incy==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgerc:incy=%d", "(""incy==1||incy==-1"") failed for " "2nd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13248 | /* Processing variable m */ | |||
| 13249 | m = len(x)x_Dims[0]; | |||
| 13250 | /* Processing variable n */ | |||
| 13251 | n = len(y)y_Dims[0]; | |||
| 13252 | /* Processing variable a */ | |||
| 13253 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 13254 | a_Dims[0]=m,a_Dims[1]=n; | |||
| 13255 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 13256 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 13257 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 13258 | if (!PyErr_Occurred()) | |||
| 13259 | PyErr_SetString(_fblas_error,"failed in converting 3rd keyword `a' of _fblas.cgerc to C/Fortran array" ); | |||
| 13260 | } else { | |||
| 13261 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 13262 | ||||
| 13263 | if (a_capi == Py_None(&_Py_NoneStruct)) { | |||
| 13264 | ||||
| 13265 | complex_float capi_c; | |||
| 13266 | int *_i,capi_i=0; | |||
| 13267 | CFUNCSMESS("cgerc: Initializing a=(capi_c.r=0.0,capi_c.i=0.0,capi_c)\n"); | |||
| 13268 | if (initforcomb(PyArray_DIMS(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->dimensions),PyArray_NDIM(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->nd),1)) { | |||
| 13269 | while ((_i = nextforcomb())) | |||
| 13270 | a[capi_i++] = (capi_c.r=0.0,capi_c.i=0.0,capi_c); /* fortran way */ | |||
| 13271 | } else { | |||
| 13272 | if (!PyErr_Occurred()) | |||
| 13273 | PyErr_SetString(_fblas_error,"Initialization of 3rd keyword a failed (initforcomb)."); | |||
| 13274 | f2py_success = 0; | |||
| 13275 | } | |||
| 13276 | } | |||
| 13277 | if (f2py_success) { | |||
| 13278 | /* Processing variable lda */ | |||
| 13279 | lda = m; | |||
| 13280 | /*end of frompyobj*/ | |||
| 13281 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13282 | f2py_start_call_clock(); | |||
| 13283 | #endif | |||
| 13284 | /*callfortranroutine*/ | |||
| 13285 | (*f2py_func)(&m,&n,&alpha,x,&incx,y,&incy,a,&lda); | |||
| 13286 | if (PyErr_Occurred()) | |||
| 13287 | f2py_success = 0; | |||
| 13288 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13289 | f2py_stop_call_clock(); | |||
| 13290 | #endif | |||
| 13291 | /*end of callfortranroutine*/ | |||
| 13292 | if (f2py_success) { | |||
| 13293 | /*pyobjfrom*/ | |||
| 13294 | /*end of pyobjfrom*/ | |||
| 13295 | CFUNCSMESS("Building return value.\n"); | |||
| 13296 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 13297 | /*closepyobjfrom*/ | |||
| 13298 | /*end of closepyobjfrom*/ | |||
| 13299 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 13300 | /*cleanupfrompyobj*/ | |||
| 13301 | /* End of cleaning variable lda */ | |||
| 13302 | } /*if (f2py_success) of a init*/ | |||
| 13303 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 13304 | /* End of cleaning variable a */ | |||
| 13305 | /* End of cleaning variable n */ | |||
| 13306 | /* End of cleaning variable m */ | |||
| 13307 | } /*CHECKSCALAR(incy==1||incy==-1)*/ | |||
| 13308 | } /*if (f2py_success) of incy*/ | |||
| 13309 | /* End of cleaning variable incy */ | |||
| 13310 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 13311 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 13312 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 13313 | /* End of cleaning variable y */ | |||
| 13314 | } /*CHECKSCALAR(incx==1||incx==-1)*/ | |||
| 13315 | } /*if (f2py_success) of incx*/ | |||
| 13316 | /* End of cleaning variable incx */ | |||
| 13317 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 13318 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 13319 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 13320 | /* End of cleaning variable x */ | |||
| 13321 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 13322 | /* End of cleaning variable alpha */ | |||
| 13323 | /*end of cleanupfrompyobj*/ | |||
| 13324 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 13325 | /*routdebugfailure*/ | |||
| 13326 | } else { | |||
| 13327 | /*routdebugleave*/ | |||
| 13328 | } | |||
| 13329 | CFUNCSMESS("Freeing memory.\n"); | |||
| 13330 | /*freemem*/ | |||
| 13331 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13332 | f2py_stop_clock(); | |||
| 13333 | #endif | |||
| 13334 | return capi_buildvalue; | |||
| 13335 | } | |||
| 13336 | /******************************** end of cgerc ********************************/ | |||
| 13337 | ||||
| 13338 | /*********************************** zgerc ***********************************/ | |||
| 13339 | static char doc_f2py_rout__fblas_zgerc[] = "\ | |||
| 13340 | a = zgerc(alpha,x,y,[incx,incy,a,overwrite_x,overwrite_y,overwrite_a])\n\nWrapper for ``zgerc``.\ | |||
| 13341 | \n\nParameters\n----------\n" | |||
| 13342 | "alpha : input complex\n" | |||
| 13343 | "x : input rank-1 array('D') with bounds (m)\n" | |||
| 13344 | "y : input rank-1 array('D') with bounds (n)\n" | |||
| 13345 | "\nOther Parameters\n----------------\n" | |||
| 13346 | "overwrite_x : input int, optional\n Default: 1\n" | |||
| 13347 | "incx : input int, optional\n Default: 1\n" | |||
| 13348 | "overwrite_y : input int, optional\n Default: 1\n" | |||
| 13349 | "incy : input int, optional\n Default: 1\n" | |||
| 13350 | "a : input rank-2 array('D') with bounds (m,n), optional\n Default: (0.0,0.0)\n" | |||
| 13351 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 13352 | "\nReturns\n-------\n" | |||
| 13353 | "a : rank-2 array('D') with bounds (m,n)"; | |||
| 13354 | /* extern void F_FUNC(zgerc,ZGERC)(int*,int*,complex_double*,complex_double*,int*,complex_double*,int*,complex_double*,int*); */ | |||
| 13355 | static PyObject *f2py_rout__fblas_zgerc(const PyObject *capi_self, | |||
| 13356 | PyObject *capi_args, | |||
| 13357 | PyObject *capi_keywds, | |||
| 13358 | void (*f2py_func)(int*,int*,complex_double*,complex_double*,int*,complex_double*,int*,complex_double*,int*)) { | |||
| 13359 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 13360 | volatile int f2py_success = 1; | |||
| 13361 | /*decl*/ | |||
| 13362 | ||||
| 13363 | int m = 0; | |||
| 13364 | int n = 0; | |||
| 13365 | complex_double alpha; | |||
| 13366 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 13367 | complex_double *x = NULL((void*)0); | |||
| 13368 | npy_intp x_Dims[1] = {-1}; | |||
| 13369 | const int x_Rank = 1; | |||
| 13370 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 13371 | int capi_x_intent = 0; | |||
| 13372 | int capi_overwrite_x = 1; | |||
| 13373 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 13374 | int incx = 0; | |||
| 13375 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 13376 | complex_double *y = NULL((void*)0); | |||
| 13377 | npy_intp y_Dims[1] = {-1}; | |||
| 13378 | const int y_Rank = 1; | |||
| 13379 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 13380 | int capi_y_intent = 0; | |||
| 13381 | int capi_overwrite_y = 1; | |||
| 13382 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 13383 | int incy = 0; | |||
| 13384 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 13385 | complex_double *a = NULL((void*)0); | |||
| 13386 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 13387 | const int a_Rank = 2; | |||
| 13388 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 13389 | int capi_a_intent = 0; | |||
| 13390 | int capi_overwrite_a = 0; | |||
| 13391 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 13392 | int lda = 0; | |||
| 13393 | static char *capi_kwlist[] = {"alpha","x","y","incx","incy","a","overwrite_x","overwrite_y","overwrite_a",NULL((void*)0)}; | |||
| 13394 | ||||
| 13395 | /*routdebugenter*/ | |||
| 13396 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13397 | f2py_start_clock(); | |||
| 13398 | #endif | |||
| 13399 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 13400 | "OOO|OOOiii:_fblas.zgerc",\ | |||
| 13401 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&incx_capi,&incy_capi,&a_capi,&capi_overwrite_x,&capi_overwrite_y,&capi_overwrite_a)) | |||
| 13402 | return NULL((void*)0); | |||
| 13403 | /*frompyobj*/ | |||
| 13404 | /* Processing variable alpha */ | |||
| 13405 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zgerc() 1st argument (alpha) can't be converted to complex_double"); | |||
| 13406 | if (f2py_success) { | |||
| 13407 | /* Processing variable x */ | |||
| 13408 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 13409 | ; | |||
| 13410 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 13411 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 13412 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 13413 | if (!PyErr_Occurred()) | |||
| 13414 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zgerc to C/Fortran array" ); | |||
| 13415 | } else { | |||
| 13416 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 13417 | ||||
| 13418 | /* Processing variable incx */ | |||
| 13419 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 13420 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zgerc() 1st keyword (incx) can't be converted to int"); | |||
| 13421 | if (f2py_success) { | |||
| 13422 | CHECKSCALAR(incx==1||incx==-1,"incx==1||incx==-1","1st keyword incx","zgerc:incx=%d",incx)if (!(incx==1||incx==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgerc:incx=%d", "(""incx==1||incx==-1"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13423 | /* Processing variable y */ | |||
| 13424 | capi_y_intent |= (capi_overwrite_y?0:F2PY_INTENT_COPY32); | |||
| 13425 | ; | |||
| 13426 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 13427 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 13428 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 13429 | if (!PyErr_Occurred()) | |||
| 13430 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.zgerc to C/Fortran array" ); | |||
| 13431 | } else { | |||
| 13432 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 13433 | ||||
| 13434 | /* Processing variable incy */ | |||
| 13435 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 13436 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zgerc() 2nd keyword (incy) can't be converted to int"); | |||
| 13437 | if (f2py_success) { | |||
| 13438 | CHECKSCALAR(incy==1||incy==-1,"incy==1||incy==-1","2nd keyword incy","zgerc:incy=%d",incy)if (!(incy==1||incy==-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgerc:incy=%d", "(""incy==1||incy==-1"") failed for " "2nd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13439 | /* Processing variable m */ | |||
| 13440 | m = len(x)x_Dims[0]; | |||
| 13441 | /* Processing variable n */ | |||
| 13442 | n = len(y)y_Dims[0]; | |||
| 13443 | /* Processing variable a */ | |||
| 13444 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 13445 | a_Dims[0]=m,a_Dims[1]=n; | |||
| 13446 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 13447 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 13448 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 13449 | if (!PyErr_Occurred()) | |||
| 13450 | PyErr_SetString(_fblas_error,"failed in converting 3rd keyword `a' of _fblas.zgerc to C/Fortran array" ); | |||
| 13451 | } else { | |||
| 13452 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 13453 | ||||
| 13454 | if (a_capi == Py_None(&_Py_NoneStruct)) { | |||
| 13455 | ||||
| 13456 | complex_double capi_c; | |||
| 13457 | int *_i,capi_i=0; | |||
| 13458 | CFUNCSMESS("zgerc: Initializing a=(capi_c.r=0.0,capi_c.i=0.0,capi_c)\n"); | |||
| 13459 | if (initforcomb(PyArray_DIMS(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->dimensions),PyArray_NDIM(capi_a_tmp)(((PyArrayObject_fields *)(capi_a_tmp))->nd),1)) { | |||
| 13460 | while ((_i = nextforcomb())) | |||
| 13461 | a[capi_i++] = (capi_c.r=0.0,capi_c.i=0.0,capi_c); /* fortran way */ | |||
| 13462 | } else { | |||
| 13463 | if (!PyErr_Occurred()) | |||
| 13464 | PyErr_SetString(_fblas_error,"Initialization of 3rd keyword a failed (initforcomb)."); | |||
| 13465 | f2py_success = 0; | |||
| 13466 | } | |||
| 13467 | } | |||
| 13468 | if (f2py_success) { | |||
| 13469 | /* Processing variable lda */ | |||
| 13470 | lda = m; | |||
| 13471 | /*end of frompyobj*/ | |||
| 13472 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13473 | f2py_start_call_clock(); | |||
| 13474 | #endif | |||
| 13475 | /*callfortranroutine*/ | |||
| 13476 | (*f2py_func)(&m,&n,&alpha,x,&incx,y,&incy,a,&lda); | |||
| 13477 | if (PyErr_Occurred()) | |||
| 13478 | f2py_success = 0; | |||
| 13479 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13480 | f2py_stop_call_clock(); | |||
| 13481 | #endif | |||
| 13482 | /*end of callfortranroutine*/ | |||
| 13483 | if (f2py_success) { | |||
| 13484 | /*pyobjfrom*/ | |||
| 13485 | /*end of pyobjfrom*/ | |||
| 13486 | CFUNCSMESS("Building return value.\n"); | |||
| 13487 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 13488 | /*closepyobjfrom*/ | |||
| 13489 | /*end of closepyobjfrom*/ | |||
| 13490 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 13491 | /*cleanupfrompyobj*/ | |||
| 13492 | /* End of cleaning variable lda */ | |||
| 13493 | } /*if (f2py_success) of a init*/ | |||
| 13494 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 13495 | /* End of cleaning variable a */ | |||
| 13496 | /* End of cleaning variable n */ | |||
| 13497 | /* End of cleaning variable m */ | |||
| 13498 | } /*CHECKSCALAR(incy==1||incy==-1)*/ | |||
| 13499 | } /*if (f2py_success) of incy*/ | |||
| 13500 | /* End of cleaning variable incy */ | |||
| 13501 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 13502 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 13503 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 13504 | /* End of cleaning variable y */ | |||
| 13505 | } /*CHECKSCALAR(incx==1||incx==-1)*/ | |||
| 13506 | } /*if (f2py_success) of incx*/ | |||
| 13507 | /* End of cleaning variable incx */ | |||
| 13508 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 13509 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 13510 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 13511 | /* End of cleaning variable x */ | |||
| 13512 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 13513 | /* End of cleaning variable alpha */ | |||
| 13514 | /*end of cleanupfrompyobj*/ | |||
| 13515 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 13516 | /*routdebugfailure*/ | |||
| 13517 | } else { | |||
| 13518 | /*routdebugleave*/ | |||
| 13519 | } | |||
| 13520 | CFUNCSMESS("Freeing memory.\n"); | |||
| 13521 | /*freemem*/ | |||
| 13522 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13523 | f2py_stop_clock(); | |||
| 13524 | #endif | |||
| 13525 | return capi_buildvalue; | |||
| 13526 | } | |||
| 13527 | /******************************** end of zgerc ********************************/ | |||
| 13528 | ||||
| 13529 | /************************************ ssyr ************************************/ | |||
| 13530 | static char doc_f2py_rout__fblas_ssyr[] = "\ | |||
| 13531 | a = ssyr(alpha,x,[lower,incx,offx,n,a,overwrite_a])\n\nWrapper for ``ssyr``.\ | |||
| 13532 | \n\nParameters\n----------\n" | |||
| 13533 | "alpha : input float\n" | |||
| 13534 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 13535 | "\nOther Parameters\n----------------\n" | |||
| 13536 | "lower : input int, optional\n Default: 0\n" | |||
| 13537 | "incx : input int, optional\n Default: 1\n" | |||
| 13538 | "offx : input int, optional\n Default: 0\n" | |||
| 13539 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 13540 | "a : input rank-2 array('f') with bounds (n,n)\n" | |||
| 13541 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 13542 | "\nReturns\n-------\n" | |||
| 13543 | "a : rank-2 array('f') with bounds (n,n)"; | |||
| 13544 | /* extern void F_FUNC(ssyr,SSYR)(char*, F_INT*, float*, float*, F_INT*, float*, F_INT* ); */ | |||
| 13545 | static PyObject *f2py_rout__fblas_ssyr(const PyObject *capi_self, | |||
| 13546 | PyObject *capi_args, | |||
| 13547 | PyObject *capi_keywds, | |||
| 13548 | void (*f2py_func)(char*, F_INTint*, float*, float*, F_INTint*, float*, F_INTint* )) { | |||
| 13549 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 13550 | volatile int f2py_success = 1; | |||
| 13551 | /*decl*/ | |||
| 13552 | ||||
| 13553 | float alpha = 0; | |||
| 13554 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 13555 | float *x = NULL((void*)0); | |||
| 13556 | npy_intp x_Dims[1] = {-1}; | |||
| 13557 | const int x_Rank = 1; | |||
| 13558 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 13559 | int capi_x_intent = 0; | |||
| 13560 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 13561 | int lower = 0; | |||
| 13562 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 13563 | int incx = 0; | |||
| 13564 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 13565 | int offx = 0; | |||
| 13566 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 13567 | int n = 0; | |||
| 13568 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 13569 | float *a = NULL((void*)0); | |||
| 13570 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 13571 | const int a_Rank = 2; | |||
| 13572 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 13573 | int capi_a_intent = 0; | |||
| 13574 | int capi_overwrite_a = 0; | |||
| 13575 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 13576 | static char *capi_kwlist[] = {"alpha","x","lower","incx","offx","n","a","overwrite_a",NULL((void*)0)}; | |||
| 13577 | ||||
| 13578 | /*routdebugenter*/ | |||
| 13579 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13580 | f2py_start_clock(); | |||
| 13581 | #endif | |||
| 13582 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 13583 | "OO|OOOOOi:_fblas.ssyr",\ | |||
| 13584 | capi_kwlist,&alpha_capi,&x_capi,&lower_capi,&incx_capi,&offx_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 13585 | return NULL((void*)0); | |||
| 13586 | /*frompyobj*/ | |||
| 13587 | /* Processing variable lower */ | |||
| 13588 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 13589 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssyr() 1st keyword (lower) can't be converted to int"); | |||
| 13590 | if (f2py_success) { | |||
| 13591 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","ssyr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13592 | /* Processing variable alpha */ | |||
| 13593 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssyr() 1st argument (alpha) can't be converted to float"); | |||
| 13594 | if (f2py_success) { | |||
| 13595 | /* Processing variable offx */ | |||
| 13596 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 13597 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ssyr() 3rd keyword (offx) can't be converted to int"); | |||
| 13598 | if (f2py_success) { | |||
| 13599 | /* Processing variable incx */ | |||
| 13600 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 13601 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ssyr() 2nd keyword (incx) can't be converted to int"); | |||
| 13602 | if (f2py_success) { | |||
| 13603 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","ssyr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13604 | /* Processing variable x */ | |||
| 13605 | ; | |||
| 13606 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 13607 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 13608 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 13609 | if (!PyErr_Occurred()) | |||
| 13610 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.ssyr to C/Fortran array" ); | |||
| 13611 | } else { | |||
| 13612 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 13613 | ||||
| 13614 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 13615 | /* Processing variable n */ | |||
| 13616 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 13617 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ssyr() 4th keyword (n) can't be converted to int"); | |||
| 13618 | if (f2py_success) { | |||
| 13619 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","4th keyword n","ssyr:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ssyr:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""4th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 13620 | CHECKSCALAR(n >= 0,"n >= 0","4th keyword n","ssyr:n=%d",n)if (!(n >= 0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr:n=%d", "(""n >= 0"") failed for ""4th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 13621 | /* Processing variable a */ | |||
| 13622 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 13623 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 13624 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 13625 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 13626 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 13627 | if (!PyErr_Occurred()) | |||
| 13628 | PyErr_SetString(_fblas_error,"failed in converting 5th keyword `a' of _fblas.ssyr to C/Fortran array" ); | |||
| 13629 | } else { | |||
| 13630 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 13631 | ||||
| 13632 | /*end of frompyobj*/ | |||
| 13633 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13634 | f2py_start_call_clock(); | |||
| 13635 | #endif | |||
| 13636 | /*callfortranroutine*/ | |||
| 13637 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,a,&n) ; | |||
| 13638 | /*(*f2py_func)(&alpha,x,&lower,&incx,&offx,&n,a);*/ | |||
| 13639 | if (PyErr_Occurred()) | |||
| 13640 | f2py_success = 0; | |||
| 13641 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13642 | f2py_stop_call_clock(); | |||
| 13643 | #endif | |||
| 13644 | /*end of callfortranroutine*/ | |||
| 13645 | if (f2py_success) { | |||
| 13646 | /*pyobjfrom*/ | |||
| 13647 | /*end of pyobjfrom*/ | |||
| 13648 | CFUNCSMESS("Building return value.\n"); | |||
| 13649 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 13650 | /*closepyobjfrom*/ | |||
| 13651 | /*end of closepyobjfrom*/ | |||
| 13652 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 13653 | /*cleanupfrompyobj*/ | |||
| 13654 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 13655 | /* End of cleaning variable a */ | |||
| 13656 | } /*CHECKSCALAR(n >= 0)*/ | |||
| 13657 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 13658 | } /*if (f2py_success) of n*/ | |||
| 13659 | /* End of cleaning variable n */ | |||
| 13660 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 13661 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 13662 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 13663 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 13664 | /* End of cleaning variable x */ | |||
| 13665 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 13666 | } /*if (f2py_success) of incx*/ | |||
| 13667 | /* End of cleaning variable incx */ | |||
| 13668 | } /*if (f2py_success) of offx*/ | |||
| 13669 | /* End of cleaning variable offx */ | |||
| 13670 | } /*if (f2py_success) of alpha*/ | |||
| 13671 | /* End of cleaning variable alpha */ | |||
| 13672 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 13673 | } /*if (f2py_success) of lower*/ | |||
| 13674 | /* End of cleaning variable lower */ | |||
| 13675 | /*end of cleanupfrompyobj*/ | |||
| 13676 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 13677 | /*routdebugfailure*/ | |||
| 13678 | } else { | |||
| 13679 | /*routdebugleave*/ | |||
| 13680 | } | |||
| 13681 | CFUNCSMESS("Freeing memory.\n"); | |||
| 13682 | /*freemem*/ | |||
| 13683 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13684 | f2py_stop_clock(); | |||
| 13685 | #endif | |||
| 13686 | return capi_buildvalue; | |||
| 13687 | } | |||
| 13688 | /******************************** end of ssyr ********************************/ | |||
| 13689 | ||||
| 13690 | /************************************ dsyr ************************************/ | |||
| 13691 | static char doc_f2py_rout__fblas_dsyr[] = "\ | |||
| 13692 | a = dsyr(alpha,x,[lower,incx,offx,n,a,overwrite_a])\n\nWrapper for ``dsyr``.\ | |||
| 13693 | \n\nParameters\n----------\n" | |||
| 13694 | "alpha : input float\n" | |||
| 13695 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 13696 | "\nOther Parameters\n----------------\n" | |||
| 13697 | "lower : input int, optional\n Default: 0\n" | |||
| 13698 | "incx : input int, optional\n Default: 1\n" | |||
| 13699 | "offx : input int, optional\n Default: 0\n" | |||
| 13700 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 13701 | "a : input rank-2 array('d') with bounds (n,n)\n" | |||
| 13702 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 13703 | "\nReturns\n-------\n" | |||
| 13704 | "a : rank-2 array('d') with bounds (n,n)"; | |||
| 13705 | /* extern void F_FUNC(dsyr,DSYR)(char*, F_INT*, double*, double*, F_INT*, double*, F_INT* ); */ | |||
| 13706 | static PyObject *f2py_rout__fblas_dsyr(const PyObject *capi_self, | |||
| 13707 | PyObject *capi_args, | |||
| 13708 | PyObject *capi_keywds, | |||
| 13709 | void (*f2py_func)(char*, F_INTint*, double*, double*, F_INTint*, double*, F_INTint* )) { | |||
| 13710 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 13711 | volatile int f2py_success = 1; | |||
| 13712 | /*decl*/ | |||
| 13713 | ||||
| 13714 | double alpha = 0; | |||
| 13715 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 13716 | double *x = NULL((void*)0); | |||
| 13717 | npy_intp x_Dims[1] = {-1}; | |||
| 13718 | const int x_Rank = 1; | |||
| 13719 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 13720 | int capi_x_intent = 0; | |||
| 13721 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 13722 | int lower = 0; | |||
| 13723 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 13724 | int incx = 0; | |||
| 13725 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 13726 | int offx = 0; | |||
| 13727 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 13728 | int n = 0; | |||
| 13729 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 13730 | double *a = NULL((void*)0); | |||
| 13731 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 13732 | const int a_Rank = 2; | |||
| 13733 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 13734 | int capi_a_intent = 0; | |||
| 13735 | int capi_overwrite_a = 0; | |||
| 13736 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 13737 | static char *capi_kwlist[] = {"alpha","x","lower","incx","offx","n","a","overwrite_a",NULL((void*)0)}; | |||
| 13738 | ||||
| 13739 | /*routdebugenter*/ | |||
| 13740 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13741 | f2py_start_clock(); | |||
| 13742 | #endif | |||
| 13743 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 13744 | "OO|OOOOOi:_fblas.dsyr",\ | |||
| 13745 | capi_kwlist,&alpha_capi,&x_capi,&lower_capi,&incx_capi,&offx_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 13746 | return NULL((void*)0); | |||
| 13747 | /*frompyobj*/ | |||
| 13748 | /* Processing variable lower */ | |||
| 13749 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 13750 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsyr() 1st keyword (lower) can't be converted to int"); | |||
| 13751 | if (f2py_success) { | |||
| 13752 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","dsyr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13753 | /* Processing variable alpha */ | |||
| 13754 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsyr() 1st argument (alpha) can't be converted to double"); | |||
| 13755 | if (f2py_success) { | |||
| 13756 | /* Processing variable offx */ | |||
| 13757 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 13758 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dsyr() 3rd keyword (offx) can't be converted to int"); | |||
| 13759 | if (f2py_success) { | |||
| 13760 | /* Processing variable incx */ | |||
| 13761 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 13762 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dsyr() 2nd keyword (incx) can't be converted to int"); | |||
| 13763 | if (f2py_success) { | |||
| 13764 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","dsyr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13765 | /* Processing variable x */ | |||
| 13766 | ; | |||
| 13767 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 13768 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 13769 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 13770 | if (!PyErr_Occurred()) | |||
| 13771 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.dsyr to C/Fortran array" ); | |||
| 13772 | } else { | |||
| 13773 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 13774 | ||||
| 13775 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 13776 | /* Processing variable n */ | |||
| 13777 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 13778 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dsyr() 4th keyword (n) can't be converted to int"); | |||
| 13779 | if (f2py_success) { | |||
| 13780 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","4th keyword n","dsyr:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dsyr:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""4th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 13781 | CHECKSCALAR(n >= 0,"n >= 0","4th keyword n","dsyr:n=%d",n)if (!(n >= 0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr:n=%d", "(""n >= 0"") failed for ""4th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 13782 | /* Processing variable a */ | |||
| 13783 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 13784 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 13785 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 13786 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 13787 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 13788 | if (!PyErr_Occurred()) | |||
| 13789 | PyErr_SetString(_fblas_error,"failed in converting 5th keyword `a' of _fblas.dsyr to C/Fortran array" ); | |||
| 13790 | } else { | |||
| 13791 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 13792 | ||||
| 13793 | /*end of frompyobj*/ | |||
| 13794 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13795 | f2py_start_call_clock(); | |||
| 13796 | #endif | |||
| 13797 | /*callfortranroutine*/ | |||
| 13798 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,a,&n) ; | |||
| 13799 | /*(*f2py_func)(&alpha,x,&lower,&incx,&offx,&n,a);*/ | |||
| 13800 | if (PyErr_Occurred()) | |||
| 13801 | f2py_success = 0; | |||
| 13802 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13803 | f2py_stop_call_clock(); | |||
| 13804 | #endif | |||
| 13805 | /*end of callfortranroutine*/ | |||
| 13806 | if (f2py_success) { | |||
| 13807 | /*pyobjfrom*/ | |||
| 13808 | /*end of pyobjfrom*/ | |||
| 13809 | CFUNCSMESS("Building return value.\n"); | |||
| 13810 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 13811 | /*closepyobjfrom*/ | |||
| 13812 | /*end of closepyobjfrom*/ | |||
| 13813 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 13814 | /*cleanupfrompyobj*/ | |||
| 13815 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 13816 | /* End of cleaning variable a */ | |||
| 13817 | } /*CHECKSCALAR(n >= 0)*/ | |||
| 13818 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 13819 | } /*if (f2py_success) of n*/ | |||
| 13820 | /* End of cleaning variable n */ | |||
| 13821 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 13822 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 13823 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 13824 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 13825 | /* End of cleaning variable x */ | |||
| 13826 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 13827 | } /*if (f2py_success) of incx*/ | |||
| 13828 | /* End of cleaning variable incx */ | |||
| 13829 | } /*if (f2py_success) of offx*/ | |||
| 13830 | /* End of cleaning variable offx */ | |||
| 13831 | } /*if (f2py_success) of alpha*/ | |||
| 13832 | /* End of cleaning variable alpha */ | |||
| 13833 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 13834 | } /*if (f2py_success) of lower*/ | |||
| 13835 | /* End of cleaning variable lower */ | |||
| 13836 | /*end of cleanupfrompyobj*/ | |||
| 13837 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 13838 | /*routdebugfailure*/ | |||
| 13839 | } else { | |||
| 13840 | /*routdebugleave*/ | |||
| 13841 | } | |||
| 13842 | CFUNCSMESS("Freeing memory.\n"); | |||
| 13843 | /*freemem*/ | |||
| 13844 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13845 | f2py_stop_clock(); | |||
| 13846 | #endif | |||
| 13847 | return capi_buildvalue; | |||
| 13848 | } | |||
| 13849 | /******************************** end of dsyr ********************************/ | |||
| 13850 | ||||
| 13851 | /************************************ csyr ************************************/ | |||
| 13852 | static char doc_f2py_rout__fblas_csyr[] = "\ | |||
| 13853 | a = csyr(alpha,x,[lower,incx,offx,n,a,overwrite_a])\n\nWrapper for ``csyr``.\ | |||
| 13854 | \n\nParameters\n----------\n" | |||
| 13855 | "alpha : input complex\n" | |||
| 13856 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 13857 | "\nOther Parameters\n----------------\n" | |||
| 13858 | "lower : input int, optional\n Default: 0\n" | |||
| 13859 | "incx : input int, optional\n Default: 1\n" | |||
| 13860 | "offx : input int, optional\n Default: 0\n" | |||
| 13861 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 13862 | "a : input rank-2 array('F') with bounds (n,n)\n" | |||
| 13863 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 13864 | "\nReturns\n-------\n" | |||
| 13865 | "a : rank-2 array('F') with bounds (n,n)"; | |||
| 13866 | /* extern void F_FUNC(csyr,CSYR)(char*, F_INT*, complex_float*, complex_float*, F_INT*, complex_float*, F_INT* ); */ | |||
| 13867 | static PyObject *f2py_rout__fblas_csyr(const PyObject *capi_self, | |||
| 13868 | PyObject *capi_args, | |||
| 13869 | PyObject *capi_keywds, | |||
| 13870 | void (*f2py_func)(char*, F_INTint*, complex_float*, complex_float*, F_INTint*, complex_float*, F_INTint* )) { | |||
| 13871 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 13872 | volatile int f2py_success = 1; | |||
| 13873 | /*decl*/ | |||
| 13874 | ||||
| 13875 | complex_float alpha; | |||
| 13876 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 13877 | complex_float *x = NULL((void*)0); | |||
| 13878 | npy_intp x_Dims[1] = {-1}; | |||
| 13879 | const int x_Rank = 1; | |||
| 13880 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 13881 | int capi_x_intent = 0; | |||
| 13882 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 13883 | int lower = 0; | |||
| 13884 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 13885 | int incx = 0; | |||
| 13886 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 13887 | int offx = 0; | |||
| 13888 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 13889 | int n = 0; | |||
| 13890 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 13891 | complex_float *a = NULL((void*)0); | |||
| 13892 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 13893 | const int a_Rank = 2; | |||
| 13894 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 13895 | int capi_a_intent = 0; | |||
| 13896 | int capi_overwrite_a = 0; | |||
| 13897 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 13898 | static char *capi_kwlist[] = {"alpha","x","lower","incx","offx","n","a","overwrite_a",NULL((void*)0)}; | |||
| 13899 | ||||
| 13900 | /*routdebugenter*/ | |||
| 13901 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13902 | f2py_start_clock(); | |||
| 13903 | #endif | |||
| 13904 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 13905 | "OO|OOOOOi:_fblas.csyr",\ | |||
| 13906 | capi_kwlist,&alpha_capi,&x_capi,&lower_capi,&incx_capi,&offx_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 13907 | return NULL((void*)0); | |||
| 13908 | /*frompyobj*/ | |||
| 13909 | /* Processing variable lower */ | |||
| 13910 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 13911 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.csyr() 1st keyword (lower) can't be converted to int"); | |||
| 13912 | if (f2py_success) { | |||
| 13913 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","csyr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csyr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13914 | /* Processing variable alpha */ | |||
| 13915 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.csyr() 1st argument (alpha) can't be converted to complex_float"); | |||
| 13916 | if (f2py_success) { | |||
| 13917 | /* Processing variable offx */ | |||
| 13918 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 13919 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.csyr() 3rd keyword (offx) can't be converted to int"); | |||
| 13920 | if (f2py_success) { | |||
| 13921 | /* Processing variable incx */ | |||
| 13922 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 13923 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.csyr() 2nd keyword (incx) can't be converted to int"); | |||
| 13924 | if (f2py_success) { | |||
| 13925 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","csyr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csyr:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 13926 | /* Processing variable x */ | |||
| 13927 | ; | |||
| 13928 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 13929 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 13930 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 13931 | if (!PyErr_Occurred()) | |||
| 13932 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.csyr to C/Fortran array" ); | |||
| 13933 | } else { | |||
| 13934 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 13935 | ||||
| 13936 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 13937 | /* Processing variable n */ | |||
| 13938 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 13939 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.csyr() 4th keyword (n) can't be converted to int"); | |||
| 13940 | if (f2py_success) { | |||
| 13941 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","4th keyword n","csyr:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csyr:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""4th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 13942 | CHECKSCALAR(n >= 0,"n >= 0","4th keyword n","csyr:n=%d",n)if (!(n >= 0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csyr:n=%d", "(""n >= 0"") failed for ""4th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 13943 | /* Processing variable a */ | |||
| 13944 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 13945 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 13946 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 13947 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 13948 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 13949 | if (!PyErr_Occurred()) | |||
| 13950 | PyErr_SetString(_fblas_error,"failed in converting 5th keyword `a' of _fblas.csyr to C/Fortran array" ); | |||
| 13951 | } else { | |||
| 13952 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 13953 | ||||
| 13954 | /*end of frompyobj*/ | |||
| 13955 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13956 | f2py_start_call_clock(); | |||
| 13957 | #endif | |||
| 13958 | /*callfortranroutine*/ | |||
| 13959 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,a,&n) ; | |||
| 13960 | /*(*f2py_func)(&alpha,x,&lower,&incx,&offx,&n,a);*/ | |||
| 13961 | if (PyErr_Occurred()) | |||
| 13962 | f2py_success = 0; | |||
| 13963 | #ifdef F2PY_REPORT_ATEXIT | |||
| 13964 | f2py_stop_call_clock(); | |||
| 13965 | #endif | |||
| 13966 | /*end of callfortranroutine*/ | |||
| 13967 | if (f2py_success) { | |||
| 13968 | /*pyobjfrom*/ | |||
| 13969 | /*end of pyobjfrom*/ | |||
| 13970 | CFUNCSMESS("Building return value.\n"); | |||
| 13971 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 13972 | /*closepyobjfrom*/ | |||
| 13973 | /*end of closepyobjfrom*/ | |||
| 13974 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 13975 | /*cleanupfrompyobj*/ | |||
| 13976 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 13977 | /* End of cleaning variable a */ | |||
| 13978 | } /*CHECKSCALAR(n >= 0)*/ | |||
| 13979 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 13980 | } /*if (f2py_success) of n*/ | |||
| 13981 | /* End of cleaning variable n */ | |||
| 13982 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 13983 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 13984 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 13985 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 13986 | /* End of cleaning variable x */ | |||
| 13987 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 13988 | } /*if (f2py_success) of incx*/ | |||
| 13989 | /* End of cleaning variable incx */ | |||
| 13990 | } /*if (f2py_success) of offx*/ | |||
| 13991 | /* End of cleaning variable offx */ | |||
| 13992 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 13993 | /* End of cleaning variable alpha */ | |||
| 13994 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 13995 | } /*if (f2py_success) of lower*/ | |||
| 13996 | /* End of cleaning variable lower */ | |||
| 13997 | /*end of cleanupfrompyobj*/ | |||
| 13998 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 13999 | /*routdebugfailure*/ | |||
| 14000 | } else { | |||
| 14001 | /*routdebugleave*/ | |||
| 14002 | } | |||
| 14003 | CFUNCSMESS("Freeing memory.\n"); | |||
| 14004 | /*freemem*/ | |||
| 14005 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14006 | f2py_stop_clock(); | |||
| 14007 | #endif | |||
| 14008 | return capi_buildvalue; | |||
| 14009 | } | |||
| 14010 | /******************************** end of csyr ********************************/ | |||
| 14011 | ||||
| 14012 | /************************************ zsyr ************************************/ | |||
| 14013 | static char doc_f2py_rout__fblas_zsyr[] = "\ | |||
| 14014 | a = zsyr(alpha,x,[lower,incx,offx,n,a,overwrite_a])\n\nWrapper for ``zsyr``.\ | |||
| 14015 | \n\nParameters\n----------\n" | |||
| 14016 | "alpha : input complex\n" | |||
| 14017 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 14018 | "\nOther Parameters\n----------------\n" | |||
| 14019 | "lower : input int, optional\n Default: 0\n" | |||
| 14020 | "incx : input int, optional\n Default: 1\n" | |||
| 14021 | "offx : input int, optional\n Default: 0\n" | |||
| 14022 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 14023 | "a : input rank-2 array('D') with bounds (n,n)\n" | |||
| 14024 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 14025 | "\nReturns\n-------\n" | |||
| 14026 | "a : rank-2 array('D') with bounds (n,n)"; | |||
| 14027 | /* extern void F_FUNC(zsyr,ZSYR)(char*, F_INT*, complex_double*, complex_double*, F_INT*, complex_double*, F_INT* ); */ | |||
| 14028 | static PyObject *f2py_rout__fblas_zsyr(const PyObject *capi_self, | |||
| 14029 | PyObject *capi_args, | |||
| 14030 | PyObject *capi_keywds, | |||
| 14031 | void (*f2py_func)(char*, F_INTint*, complex_double*, complex_double*, F_INTint*, complex_double*, F_INTint* )) { | |||
| 14032 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 14033 | volatile int f2py_success = 1; | |||
| 14034 | /*decl*/ | |||
| 14035 | ||||
| 14036 | complex_double alpha; | |||
| 14037 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 14038 | complex_double *x = NULL((void*)0); | |||
| 14039 | npy_intp x_Dims[1] = {-1}; | |||
| 14040 | const int x_Rank = 1; | |||
| 14041 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 14042 | int capi_x_intent = 0; | |||
| 14043 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 14044 | int lower = 0; | |||
| 14045 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 14046 | int incx = 0; | |||
| 14047 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 14048 | int offx = 0; | |||
| 14049 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 14050 | int n = 0; | |||
| 14051 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 14052 | complex_double *a = NULL((void*)0); | |||
| 14053 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 14054 | const int a_Rank = 2; | |||
| 14055 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 14056 | int capi_a_intent = 0; | |||
| 14057 | int capi_overwrite_a = 0; | |||
| 14058 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 14059 | static char *capi_kwlist[] = {"alpha","x","lower","incx","offx","n","a","overwrite_a",NULL((void*)0)}; | |||
| 14060 | ||||
| 14061 | /*routdebugenter*/ | |||
| 14062 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14063 | f2py_start_clock(); | |||
| 14064 | #endif | |||
| 14065 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 14066 | "OO|OOOOOi:_fblas.zsyr",\ | |||
| 14067 | capi_kwlist,&alpha_capi,&x_capi,&lower_capi,&incx_capi,&offx_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 14068 | return NULL((void*)0); | |||
| 14069 | /*frompyobj*/ | |||
| 14070 | /* Processing variable lower */ | |||
| 14071 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 14072 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zsyr() 1st keyword (lower) can't be converted to int"); | |||
| 14073 | if (f2py_success) { | |||
| 14074 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","zsyr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsyr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14075 | /* Processing variable alpha */ | |||
| 14076 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zsyr() 1st argument (alpha) can't be converted to complex_double"); | |||
| 14077 | if (f2py_success) { | |||
| 14078 | /* Processing variable offx */ | |||
| 14079 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 14080 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zsyr() 3rd keyword (offx) can't be converted to int"); | |||
| 14081 | if (f2py_success) { | |||
| 14082 | /* Processing variable incx */ | |||
| 14083 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 14084 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zsyr() 2nd keyword (incx) can't be converted to int"); | |||
| 14085 | if (f2py_success) { | |||
| 14086 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","zsyr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsyr:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14087 | /* Processing variable x */ | |||
| 14088 | ; | |||
| 14089 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 14090 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 14091 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 14092 | if (!PyErr_Occurred()) | |||
| 14093 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zsyr to C/Fortran array" ); | |||
| 14094 | } else { | |||
| 14095 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 14096 | ||||
| 14097 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 14098 | /* Processing variable n */ | |||
| 14099 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 14100 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zsyr() 4th keyword (n) can't be converted to int"); | |||
| 14101 | if (f2py_success) { | |||
| 14102 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","4th keyword n","zsyr:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zsyr:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""4th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14103 | CHECKSCALAR(n >= 0,"n >= 0","4th keyword n","zsyr:n=%d",n)if (!(n >= 0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsyr:n=%d", "(""n >= 0"") failed for ""4th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 14104 | /* Processing variable a */ | |||
| 14105 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 14106 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 14107 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 14108 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 14109 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 14110 | if (!PyErr_Occurred()) | |||
| 14111 | PyErr_SetString(_fblas_error,"failed in converting 5th keyword `a' of _fblas.zsyr to C/Fortran array" ); | |||
| 14112 | } else { | |||
| 14113 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 14114 | ||||
| 14115 | /*end of frompyobj*/ | |||
| 14116 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14117 | f2py_start_call_clock(); | |||
| 14118 | #endif | |||
| 14119 | /*callfortranroutine*/ | |||
| 14120 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,a,&n) ; | |||
| 14121 | /*(*f2py_func)(&alpha,x,&lower,&incx,&offx,&n,a);*/ | |||
| 14122 | if (PyErr_Occurred()) | |||
| 14123 | f2py_success = 0; | |||
| 14124 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14125 | f2py_stop_call_clock(); | |||
| 14126 | #endif | |||
| 14127 | /*end of callfortranroutine*/ | |||
| 14128 | if (f2py_success) { | |||
| 14129 | /*pyobjfrom*/ | |||
| 14130 | /*end of pyobjfrom*/ | |||
| 14131 | CFUNCSMESS("Building return value.\n"); | |||
| 14132 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 14133 | /*closepyobjfrom*/ | |||
| 14134 | /*end of closepyobjfrom*/ | |||
| 14135 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 14136 | /*cleanupfrompyobj*/ | |||
| 14137 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 14138 | /* End of cleaning variable a */ | |||
| 14139 | } /*CHECKSCALAR(n >= 0)*/ | |||
| 14140 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 14141 | } /*if (f2py_success) of n*/ | |||
| 14142 | /* End of cleaning variable n */ | |||
| 14143 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 14144 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 14145 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 14146 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 14147 | /* End of cleaning variable x */ | |||
| 14148 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 14149 | } /*if (f2py_success) of incx*/ | |||
| 14150 | /* End of cleaning variable incx */ | |||
| 14151 | } /*if (f2py_success) of offx*/ | |||
| 14152 | /* End of cleaning variable offx */ | |||
| 14153 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 14154 | /* End of cleaning variable alpha */ | |||
| 14155 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 14156 | } /*if (f2py_success) of lower*/ | |||
| 14157 | /* End of cleaning variable lower */ | |||
| 14158 | /*end of cleanupfrompyobj*/ | |||
| 14159 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 14160 | /*routdebugfailure*/ | |||
| 14161 | } else { | |||
| 14162 | /*routdebugleave*/ | |||
| 14163 | } | |||
| 14164 | CFUNCSMESS("Freeing memory.\n"); | |||
| 14165 | /*freemem*/ | |||
| 14166 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14167 | f2py_stop_clock(); | |||
| 14168 | #endif | |||
| 14169 | return capi_buildvalue; | |||
| 14170 | } | |||
| 14171 | /******************************** end of zsyr ********************************/ | |||
| 14172 | ||||
| 14173 | /************************************ cher ************************************/ | |||
| 14174 | static char doc_f2py_rout__fblas_cher[] = "\ | |||
| 14175 | a = cher(alpha,x,[lower,incx,offx,n,a,overwrite_a])\n\nWrapper for ``cher``.\ | |||
| 14176 | \n\nParameters\n----------\n" | |||
| 14177 | "alpha : input complex\n" | |||
| 14178 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 14179 | "\nOther Parameters\n----------------\n" | |||
| 14180 | "lower : input int, optional\n Default: 0\n" | |||
| 14181 | "incx : input int, optional\n Default: 1\n" | |||
| 14182 | "offx : input int, optional\n Default: 0\n" | |||
| 14183 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 14184 | "a : input rank-2 array('F') with bounds (n,n)\n" | |||
| 14185 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 14186 | "\nReturns\n-------\n" | |||
| 14187 | "a : rank-2 array('F') with bounds (n,n)"; | |||
| 14188 | /* extern void F_FUNC(cher,CHER)(char*, F_INT*, complex_float*, complex_float*, F_INT*, complex_float*, F_INT* ); */ | |||
| 14189 | static PyObject *f2py_rout__fblas_cher(const PyObject *capi_self, | |||
| 14190 | PyObject *capi_args, | |||
| 14191 | PyObject *capi_keywds, | |||
| 14192 | void (*f2py_func)(char*, F_INTint*, complex_float*, complex_float*, F_INTint*, complex_float*, F_INTint* )) { | |||
| 14193 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 14194 | volatile int f2py_success = 1; | |||
| 14195 | /*decl*/ | |||
| 14196 | ||||
| 14197 | complex_float alpha; | |||
| 14198 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 14199 | complex_float *x = NULL((void*)0); | |||
| 14200 | npy_intp x_Dims[1] = {-1}; | |||
| 14201 | const int x_Rank = 1; | |||
| 14202 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 14203 | int capi_x_intent = 0; | |||
| 14204 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 14205 | int lower = 0; | |||
| 14206 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 14207 | int incx = 0; | |||
| 14208 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 14209 | int offx = 0; | |||
| 14210 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 14211 | int n = 0; | |||
| 14212 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 14213 | complex_float *a = NULL((void*)0); | |||
| 14214 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 14215 | const int a_Rank = 2; | |||
| 14216 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 14217 | int capi_a_intent = 0; | |||
| 14218 | int capi_overwrite_a = 0; | |||
| 14219 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 14220 | static char *capi_kwlist[] = {"alpha","x","lower","incx","offx","n","a","overwrite_a",NULL((void*)0)}; | |||
| 14221 | ||||
| 14222 | /*routdebugenter*/ | |||
| 14223 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14224 | f2py_start_clock(); | |||
| 14225 | #endif | |||
| 14226 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 14227 | "OO|OOOOOi:_fblas.cher",\ | |||
| 14228 | capi_kwlist,&alpha_capi,&x_capi,&lower_capi,&incx_capi,&offx_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 14229 | return NULL((void*)0); | |||
| 14230 | /*frompyobj*/ | |||
| 14231 | /* Processing variable lower */ | |||
| 14232 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 14233 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.cher() 1st keyword (lower) can't be converted to int"); | |||
| 14234 | if (f2py_success) { | |||
| 14235 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","cher:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14236 | /* Processing variable alpha */ | |||
| 14237 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cher() 1st argument (alpha) can't be converted to complex_float"); | |||
| 14238 | if (f2py_success) { | |||
| 14239 | /* Processing variable offx */ | |||
| 14240 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 14241 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cher() 3rd keyword (offx) can't be converted to int"); | |||
| 14242 | if (f2py_success) { | |||
| 14243 | /* Processing variable incx */ | |||
| 14244 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 14245 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cher() 2nd keyword (incx) can't be converted to int"); | |||
| 14246 | if (f2py_success) { | |||
| 14247 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","cher:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14248 | /* Processing variable x */ | |||
| 14249 | ; | |||
| 14250 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 14251 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 14252 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 14253 | if (!PyErr_Occurred()) | |||
| 14254 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.cher to C/Fortran array" ); | |||
| 14255 | } else { | |||
| 14256 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 14257 | ||||
| 14258 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 14259 | /* Processing variable n */ | |||
| 14260 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 14261 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cher() 4th keyword (n) can't be converted to int"); | |||
| 14262 | if (f2py_success) { | |||
| 14263 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","4th keyword n","cher:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cher:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""4th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14264 | CHECKSCALAR(n >= 0,"n >= 0","4th keyword n","cher:n=%d",n)if (!(n >= 0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher:n=%d", "(""n >= 0"") failed for ""4th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 14265 | /* Processing variable a */ | |||
| 14266 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 14267 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 14268 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 14269 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 14270 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 14271 | if (!PyErr_Occurred()) | |||
| 14272 | PyErr_SetString(_fblas_error,"failed in converting 5th keyword `a' of _fblas.cher to C/Fortran array" ); | |||
| 14273 | } else { | |||
| 14274 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 14275 | ||||
| 14276 | /*end of frompyobj*/ | |||
| 14277 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14278 | f2py_start_call_clock(); | |||
| 14279 | #endif | |||
| 14280 | /*callfortranroutine*/ | |||
| 14281 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,a,&n) ; | |||
| 14282 | /*(*f2py_func)(&alpha,x,&lower,&incx,&offx,&n,a);*/ | |||
| 14283 | if (PyErr_Occurred()) | |||
| 14284 | f2py_success = 0; | |||
| 14285 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14286 | f2py_stop_call_clock(); | |||
| 14287 | #endif | |||
| 14288 | /*end of callfortranroutine*/ | |||
| 14289 | if (f2py_success) { | |||
| 14290 | /*pyobjfrom*/ | |||
| 14291 | /*end of pyobjfrom*/ | |||
| 14292 | CFUNCSMESS("Building return value.\n"); | |||
| 14293 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 14294 | /*closepyobjfrom*/ | |||
| 14295 | /*end of closepyobjfrom*/ | |||
| 14296 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 14297 | /*cleanupfrompyobj*/ | |||
| 14298 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 14299 | /* End of cleaning variable a */ | |||
| 14300 | } /*CHECKSCALAR(n >= 0)*/ | |||
| 14301 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 14302 | } /*if (f2py_success) of n*/ | |||
| 14303 | /* End of cleaning variable n */ | |||
| 14304 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 14305 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 14306 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 14307 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 14308 | /* End of cleaning variable x */ | |||
| 14309 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 14310 | } /*if (f2py_success) of incx*/ | |||
| 14311 | /* End of cleaning variable incx */ | |||
| 14312 | } /*if (f2py_success) of offx*/ | |||
| 14313 | /* End of cleaning variable offx */ | |||
| 14314 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 14315 | /* End of cleaning variable alpha */ | |||
| 14316 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 14317 | } /*if (f2py_success) of lower*/ | |||
| 14318 | /* End of cleaning variable lower */ | |||
| 14319 | /*end of cleanupfrompyobj*/ | |||
| 14320 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 14321 | /*routdebugfailure*/ | |||
| 14322 | } else { | |||
| 14323 | /*routdebugleave*/ | |||
| 14324 | } | |||
| 14325 | CFUNCSMESS("Freeing memory.\n"); | |||
| 14326 | /*freemem*/ | |||
| 14327 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14328 | f2py_stop_clock(); | |||
| 14329 | #endif | |||
| 14330 | return capi_buildvalue; | |||
| 14331 | } | |||
| 14332 | /******************************** end of cher ********************************/ | |||
| 14333 | ||||
| 14334 | /************************************ zher ************************************/ | |||
| 14335 | static char doc_f2py_rout__fblas_zher[] = "\ | |||
| 14336 | a = zher(alpha,x,[lower,incx,offx,n,a,overwrite_a])\n\nWrapper for ``zher``.\ | |||
| 14337 | \n\nParameters\n----------\n" | |||
| 14338 | "alpha : input complex\n" | |||
| 14339 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 14340 | "\nOther Parameters\n----------------\n" | |||
| 14341 | "lower : input int, optional\n Default: 0\n" | |||
| 14342 | "incx : input int, optional\n Default: 1\n" | |||
| 14343 | "offx : input int, optional\n Default: 0\n" | |||
| 14344 | "n : input int, optional\n Default: (len(x)-1-offx)/abs(incx)+1\n" | |||
| 14345 | "a : input rank-2 array('D') with bounds (n,n)\n" | |||
| 14346 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 14347 | "\nReturns\n-------\n" | |||
| 14348 | "a : rank-2 array('D') with bounds (n,n)"; | |||
| 14349 | /* extern void F_FUNC(zher,ZHER)(char*, F_INT*, complex_double*, complex_double*, F_INT*, complex_double*, F_INT* ); */ | |||
| 14350 | static PyObject *f2py_rout__fblas_zher(const PyObject *capi_self, | |||
| 14351 | PyObject *capi_args, | |||
| 14352 | PyObject *capi_keywds, | |||
| 14353 | void (*f2py_func)(char*, F_INTint*, complex_double*, complex_double*, F_INTint*, complex_double*, F_INTint* )) { | |||
| 14354 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 14355 | volatile int f2py_success = 1; | |||
| 14356 | /*decl*/ | |||
| 14357 | ||||
| 14358 | complex_double alpha; | |||
| 14359 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 14360 | complex_double *x = NULL((void*)0); | |||
| 14361 | npy_intp x_Dims[1] = {-1}; | |||
| 14362 | const int x_Rank = 1; | |||
| 14363 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 14364 | int capi_x_intent = 0; | |||
| 14365 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 14366 | int lower = 0; | |||
| 14367 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 14368 | int incx = 0; | |||
| 14369 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 14370 | int offx = 0; | |||
| 14371 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 14372 | int n = 0; | |||
| 14373 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 14374 | complex_double *a = NULL((void*)0); | |||
| 14375 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 14376 | const int a_Rank = 2; | |||
| 14377 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 14378 | int capi_a_intent = 0; | |||
| 14379 | int capi_overwrite_a = 0; | |||
| 14380 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 14381 | static char *capi_kwlist[] = {"alpha","x","lower","incx","offx","n","a","overwrite_a",NULL((void*)0)}; | |||
| 14382 | ||||
| 14383 | /*routdebugenter*/ | |||
| 14384 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14385 | f2py_start_clock(); | |||
| 14386 | #endif | |||
| 14387 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 14388 | "OO|OOOOOi:_fblas.zher",\ | |||
| 14389 | capi_kwlist,&alpha_capi,&x_capi,&lower_capi,&incx_capi,&offx_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 14390 | return NULL((void*)0); | |||
| 14391 | /*frompyobj*/ | |||
| 14392 | /* Processing variable lower */ | |||
| 14393 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 14394 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zher() 1st keyword (lower) can't be converted to int"); | |||
| 14395 | if (f2py_success) { | |||
| 14396 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","zher:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14397 | /* Processing variable alpha */ | |||
| 14398 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zher() 1st argument (alpha) can't be converted to complex_double"); | |||
| 14399 | if (f2py_success) { | |||
| 14400 | /* Processing variable offx */ | |||
| 14401 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 14402 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zher() 3rd keyword (offx) can't be converted to int"); | |||
| 14403 | if (f2py_success) { | |||
| 14404 | /* Processing variable incx */ | |||
| 14405 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 14406 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zher() 2nd keyword (incx) can't be converted to int"); | |||
| 14407 | if (f2py_success) { | |||
| 14408 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","zher:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14409 | /* Processing variable x */ | |||
| 14410 | ; | |||
| 14411 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 14412 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 14413 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 14414 | if (!PyErr_Occurred()) | |||
| 14415 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zher to C/Fortran array" ); | |||
| 14416 | } else { | |||
| 14417 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 14418 | ||||
| 14419 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 14420 | /* Processing variable n */ | |||
| 14421 | if (n_capi == Py_None(&_Py_NoneStruct)) n = (len(x)x_Dims[0]-1-offx)/abs(incx)+1; else | |||
| 14422 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zher() 4th keyword (n) can't be converted to int"); | |||
| 14423 | if (f2py_success) { | |||
| 14424 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","4th keyword n","zher:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zher:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""4th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14425 | CHECKSCALAR(n >= 0,"n >= 0","4th keyword n","zher:n=%d",n)if (!(n >= 0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher:n=%d", "(""n >= 0"") failed for ""4th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 14426 | /* Processing variable a */ | |||
| 14427 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 14428 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 14429 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 14430 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 14431 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 14432 | if (!PyErr_Occurred()) | |||
| 14433 | PyErr_SetString(_fblas_error,"failed in converting 5th keyword `a' of _fblas.zher to C/Fortran array" ); | |||
| 14434 | } else { | |||
| 14435 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 14436 | ||||
| 14437 | /*end of frompyobj*/ | |||
| 14438 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14439 | f2py_start_call_clock(); | |||
| 14440 | #endif | |||
| 14441 | /*callfortranroutine*/ | |||
| 14442 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,a,&n) ; | |||
| 14443 | /*(*f2py_func)(&alpha,x,&lower,&incx,&offx,&n,a);*/ | |||
| 14444 | if (PyErr_Occurred()) | |||
| 14445 | f2py_success = 0; | |||
| 14446 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14447 | f2py_stop_call_clock(); | |||
| 14448 | #endif | |||
| 14449 | /*end of callfortranroutine*/ | |||
| 14450 | if (f2py_success) { | |||
| 14451 | /*pyobjfrom*/ | |||
| 14452 | /*end of pyobjfrom*/ | |||
| 14453 | CFUNCSMESS("Building return value.\n"); | |||
| 14454 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 14455 | /*closepyobjfrom*/ | |||
| 14456 | /*end of closepyobjfrom*/ | |||
| 14457 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 14458 | /*cleanupfrompyobj*/ | |||
| 14459 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 14460 | /* End of cleaning variable a */ | |||
| 14461 | } /*CHECKSCALAR(n >= 0)*/ | |||
| 14462 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 14463 | } /*if (f2py_success) of n*/ | |||
| 14464 | /* End of cleaning variable n */ | |||
| 14465 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 14466 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 14467 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 14468 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 14469 | /* End of cleaning variable x */ | |||
| 14470 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 14471 | } /*if (f2py_success) of incx*/ | |||
| 14472 | /* End of cleaning variable incx */ | |||
| 14473 | } /*if (f2py_success) of offx*/ | |||
| 14474 | /* End of cleaning variable offx */ | |||
| 14475 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 14476 | /* End of cleaning variable alpha */ | |||
| 14477 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 14478 | } /*if (f2py_success) of lower*/ | |||
| 14479 | /* End of cleaning variable lower */ | |||
| 14480 | /*end of cleanupfrompyobj*/ | |||
| 14481 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 14482 | /*routdebugfailure*/ | |||
| 14483 | } else { | |||
| 14484 | /*routdebugleave*/ | |||
| 14485 | } | |||
| 14486 | CFUNCSMESS("Freeing memory.\n"); | |||
| 14487 | /*freemem*/ | |||
| 14488 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14489 | f2py_stop_clock(); | |||
| 14490 | #endif | |||
| 14491 | return capi_buildvalue; | |||
| 14492 | } | |||
| 14493 | /******************************** end of zher ********************************/ | |||
| 14494 | ||||
| 14495 | /*********************************** ssyr2 ***********************************/ | |||
| 14496 | static char doc_f2py_rout__fblas_ssyr2[] = "\ | |||
| 14497 | a = ssyr2(alpha,x,y,[lower,incx,offx,incy,offy,n,a,overwrite_a])\n\nWrapper for ``ssyr2``.\ | |||
| 14498 | \n\nParameters\n----------\n" | |||
| 14499 | "alpha : input float\n" | |||
| 14500 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 14501 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 14502 | "\nOther Parameters\n----------------\n" | |||
| 14503 | "lower : input int, optional\n Default: 0\n" | |||
| 14504 | "incx : input int, optional\n Default: 1\n" | |||
| 14505 | "offx : input int, optional\n Default: 0\n" | |||
| 14506 | "incy : input int, optional\n Default: 1\n" | |||
| 14507 | "offy : input int, optional\n Default: 0\n" | |||
| 14508 | "n : input int, optional\n Default: ((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1)\n" | |||
| 14509 | "a : input rank-2 array('f') with bounds (n,n)\n" | |||
| 14510 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 14511 | "\nReturns\n-------\n" | |||
| 14512 | "a : rank-2 array('f') with bounds (n,n)"; | |||
| 14513 | /* extern void F_FUNC(ssyr2,SSYR2)(char*, F_INT*, float*, float*, F_INT*, float*, F_INT*, float*, F_INT* ); */ | |||
| 14514 | static PyObject *f2py_rout__fblas_ssyr2(const PyObject *capi_self, | |||
| 14515 | PyObject *capi_args, | |||
| 14516 | PyObject *capi_keywds, | |||
| 14517 | void (*f2py_func)(char*, F_INTint*, float*, float*, F_INTint*, float*, F_INTint*, float*, F_INTint* )) { | |||
| 14518 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 14519 | volatile int f2py_success = 1; | |||
| 14520 | /*decl*/ | |||
| 14521 | ||||
| 14522 | float alpha = 0; | |||
| 14523 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 14524 | float *x = NULL((void*)0); | |||
| 14525 | npy_intp x_Dims[1] = {-1}; | |||
| 14526 | const int x_Rank = 1; | |||
| 14527 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 14528 | int capi_x_intent = 0; | |||
| 14529 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 14530 | float *y = NULL((void*)0); | |||
| 14531 | npy_intp y_Dims[1] = {-1}; | |||
| 14532 | const int y_Rank = 1; | |||
| 14533 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 14534 | int capi_y_intent = 0; | |||
| 14535 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 14536 | int lower = 0; | |||
| 14537 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 14538 | int incx = 0; | |||
| 14539 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 14540 | int offx = 0; | |||
| 14541 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 14542 | int incy = 0; | |||
| 14543 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 14544 | int offy = 0; | |||
| 14545 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 14546 | int n = 0; | |||
| 14547 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 14548 | float *a = NULL((void*)0); | |||
| 14549 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 14550 | const int a_Rank = 2; | |||
| 14551 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 14552 | int capi_a_intent = 0; | |||
| 14553 | int capi_overwrite_a = 0; | |||
| 14554 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 14555 | static char *capi_kwlist[] = {"alpha","x","y","lower","incx","offx","incy","offy","n","a","overwrite_a",NULL((void*)0)}; | |||
| 14556 | ||||
| 14557 | /*routdebugenter*/ | |||
| 14558 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14559 | f2py_start_clock(); | |||
| 14560 | #endif | |||
| 14561 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 14562 | "OOO|OOOOOOOi:_fblas.ssyr2",\ | |||
| 14563 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&lower_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 14564 | return NULL((void*)0); | |||
| 14565 | /*frompyobj*/ | |||
| 14566 | /* Processing variable lower */ | |||
| 14567 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 14568 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssyr2() 1st keyword (lower) can't be converted to int"); | |||
| 14569 | if (f2py_success) { | |||
| 14570 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","ssyr2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14571 | /* Processing variable alpha */ | |||
| 14572 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssyr2() 1st argument (alpha) can't be converted to float"); | |||
| 14573 | if (f2py_success) { | |||
| 14574 | /* Processing variable incx */ | |||
| 14575 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 14576 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ssyr2() 2nd keyword (incx) can't be converted to int"); | |||
| 14577 | if (f2py_success) { | |||
| 14578 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","ssyr2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr2:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14579 | /* Processing variable offx */ | |||
| 14580 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 14581 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ssyr2() 3rd keyword (offx) can't be converted to int"); | |||
| 14582 | if (f2py_success) { | |||
| 14583 | /* Processing variable incy */ | |||
| 14584 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 14585 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.ssyr2() 4th keyword (incy) can't be converted to int"); | |||
| 14586 | if (f2py_success) { | |||
| 14587 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","4th keyword incy","ssyr2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr2:incy=%d", "(""incy>0||incy<0"") failed for " "4th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14588 | /* Processing variable offy */ | |||
| 14589 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 14590 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.ssyr2() 5th keyword (offy) can't be converted to int"); | |||
| 14591 | if (f2py_success) { | |||
| 14592 | /* Processing variable x */ | |||
| 14593 | ; | |||
| 14594 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 14595 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 14596 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 14597 | if (!PyErr_Occurred()) | |||
| 14598 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.ssyr2 to C/Fortran array" ); | |||
| 14599 | } else { | |||
| 14600 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 14601 | ||||
| 14602 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 14603 | /* Processing variable y */ | |||
| 14604 | ; | |||
| 14605 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 14606 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 14607 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 14608 | if (!PyErr_Occurred()) | |||
| 14609 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.ssyr2 to C/Fortran array" ); | |||
| 14610 | } else { | |||
| 14611 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 14612 | ||||
| 14613 | CHECKARRAY(offy >= 0 && offy < len(y),"offy >= 0 && offy < len(y)","3rd argument y")if (!(offy >= 0 && offy < y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy >= 0 && offy < len(y)"") failed for " "3rd argument y"); } else { | |||
| 14614 | /* Processing variable n */ | |||
| 14615 | if (n_capi == Py_None(&_Py_NoneStruct)) n = ((len(x)x_Dims[0]-1-offx)/abs(incx)+1 <=(len(y)y_Dims[0]-1-offy)/abs(incy)+1 ?(len(x)x_Dims[0]-1-offx)/abs(incx)+1 :(len(y)y_Dims[0]-1-offy)/abs(incy)+1); else | |||
| 14616 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ssyr2() 6th keyword (n) can't be converted to int"); | |||
| 14617 | if (f2py_success) { | |||
| 14618 | CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1,"n <= (len(y)-1-offy)/abs(incy)+1","6th keyword n","ssyr2:n=%d",n)if (!(n <= (y_Dims[0]-1-offy)/abs(incy)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ssyr2:n=%d", "(""n <= (len(y)-1-offy)/abs(incy)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14619 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","6th keyword n","ssyr2:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ssyr2:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14620 | CHECKSCALAR(n>=0,"n>=0","6th keyword n","ssyr2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr2:n=%d", "(""n>=0"") failed for ""6th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 14621 | /* Processing variable a */ | |||
| 14622 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 14623 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 14624 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 14625 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 14626 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 14627 | if (!PyErr_Occurred()) | |||
| 14628 | PyErr_SetString(_fblas_error,"failed in converting 7th keyword `a' of _fblas.ssyr2 to C/Fortran array" ); | |||
| 14629 | } else { | |||
| 14630 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 14631 | ||||
| 14632 | /*end of frompyobj*/ | |||
| 14633 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14634 | f2py_start_call_clock(); | |||
| 14635 | #endif | |||
| 14636 | /*callfortranroutine*/ | |||
| 14637 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,a,&n) ; | |||
| 14638 | /*(*f2py_func)(&alpha,x,y,&lower,&incx,&offx,&incy,&offy,&n,a);*/ | |||
| 14639 | if (PyErr_Occurred()) | |||
| 14640 | f2py_success = 0; | |||
| 14641 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14642 | f2py_stop_call_clock(); | |||
| 14643 | #endif | |||
| 14644 | /*end of callfortranroutine*/ | |||
| 14645 | if (f2py_success) { | |||
| 14646 | /*pyobjfrom*/ | |||
| 14647 | /*end of pyobjfrom*/ | |||
| 14648 | CFUNCSMESS("Building return value.\n"); | |||
| 14649 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 14650 | /*closepyobjfrom*/ | |||
| 14651 | /*end of closepyobjfrom*/ | |||
| 14652 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 14653 | /*cleanupfrompyobj*/ | |||
| 14654 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 14655 | /* End of cleaning variable a */ | |||
| 14656 | } /*CHECKSCALAR(n>=0)*/ | |||
| 14657 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 14658 | } /*CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1)*/ | |||
| 14659 | } /*if (f2py_success) of n*/ | |||
| 14660 | /* End of cleaning variable n */ | |||
| 14661 | } /*CHECKARRAY(offy >= 0 && offy < len(y))*/ | |||
| 14662 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 14663 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 14664 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 14665 | /* End of cleaning variable y */ | |||
| 14666 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 14667 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 14668 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 14669 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 14670 | /* End of cleaning variable x */ | |||
| 14671 | } /*if (f2py_success) of offy*/ | |||
| 14672 | /* End of cleaning variable offy */ | |||
| 14673 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 14674 | } /*if (f2py_success) of incy*/ | |||
| 14675 | /* End of cleaning variable incy */ | |||
| 14676 | } /*if (f2py_success) of offx*/ | |||
| 14677 | /* End of cleaning variable offx */ | |||
| 14678 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 14679 | } /*if (f2py_success) of incx*/ | |||
| 14680 | /* End of cleaning variable incx */ | |||
| 14681 | } /*if (f2py_success) of alpha*/ | |||
| 14682 | /* End of cleaning variable alpha */ | |||
| 14683 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 14684 | } /*if (f2py_success) of lower*/ | |||
| 14685 | /* End of cleaning variable lower */ | |||
| 14686 | /*end of cleanupfrompyobj*/ | |||
| 14687 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 14688 | /*routdebugfailure*/ | |||
| 14689 | } else { | |||
| 14690 | /*routdebugleave*/ | |||
| 14691 | } | |||
| 14692 | CFUNCSMESS("Freeing memory.\n"); | |||
| 14693 | /*freemem*/ | |||
| 14694 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14695 | f2py_stop_clock(); | |||
| 14696 | #endif | |||
| 14697 | return capi_buildvalue; | |||
| 14698 | } | |||
| 14699 | /******************************** end of ssyr2 ********************************/ | |||
| 14700 | ||||
| 14701 | /*********************************** dsyr2 ***********************************/ | |||
| 14702 | static char doc_f2py_rout__fblas_dsyr2[] = "\ | |||
| 14703 | a = dsyr2(alpha,x,y,[lower,incx,offx,incy,offy,n,a,overwrite_a])\n\nWrapper for ``dsyr2``.\ | |||
| 14704 | \n\nParameters\n----------\n" | |||
| 14705 | "alpha : input float\n" | |||
| 14706 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 14707 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 14708 | "\nOther Parameters\n----------------\n" | |||
| 14709 | "lower : input int, optional\n Default: 0\n" | |||
| 14710 | "incx : input int, optional\n Default: 1\n" | |||
| 14711 | "offx : input int, optional\n Default: 0\n" | |||
| 14712 | "incy : input int, optional\n Default: 1\n" | |||
| 14713 | "offy : input int, optional\n Default: 0\n" | |||
| 14714 | "n : input int, optional\n Default: ((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1)\n" | |||
| 14715 | "a : input rank-2 array('d') with bounds (n,n)\n" | |||
| 14716 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 14717 | "\nReturns\n-------\n" | |||
| 14718 | "a : rank-2 array('d') with bounds (n,n)"; | |||
| 14719 | /* extern void F_FUNC(dsyr2,DSYR2)(char*, F_INT*, double*, double*, F_INT*, double*, F_INT*, double*, F_INT* ); */ | |||
| 14720 | static PyObject *f2py_rout__fblas_dsyr2(const PyObject *capi_self, | |||
| 14721 | PyObject *capi_args, | |||
| 14722 | PyObject *capi_keywds, | |||
| 14723 | void (*f2py_func)(char*, F_INTint*, double*, double*, F_INTint*, double*, F_INTint*, double*, F_INTint* )) { | |||
| 14724 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 14725 | volatile int f2py_success = 1; | |||
| 14726 | /*decl*/ | |||
| 14727 | ||||
| 14728 | double alpha = 0; | |||
| 14729 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 14730 | double *x = NULL((void*)0); | |||
| 14731 | npy_intp x_Dims[1] = {-1}; | |||
| 14732 | const int x_Rank = 1; | |||
| 14733 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 14734 | int capi_x_intent = 0; | |||
| 14735 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 14736 | double *y = NULL((void*)0); | |||
| 14737 | npy_intp y_Dims[1] = {-1}; | |||
| 14738 | const int y_Rank = 1; | |||
| 14739 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 14740 | int capi_y_intent = 0; | |||
| 14741 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 14742 | int lower = 0; | |||
| 14743 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 14744 | int incx = 0; | |||
| 14745 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 14746 | int offx = 0; | |||
| 14747 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 14748 | int incy = 0; | |||
| 14749 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 14750 | int offy = 0; | |||
| 14751 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 14752 | int n = 0; | |||
| 14753 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 14754 | double *a = NULL((void*)0); | |||
| 14755 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 14756 | const int a_Rank = 2; | |||
| 14757 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 14758 | int capi_a_intent = 0; | |||
| 14759 | int capi_overwrite_a = 0; | |||
| 14760 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 14761 | static char *capi_kwlist[] = {"alpha","x","y","lower","incx","offx","incy","offy","n","a","overwrite_a",NULL((void*)0)}; | |||
| 14762 | ||||
| 14763 | /*routdebugenter*/ | |||
| 14764 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14765 | f2py_start_clock(); | |||
| 14766 | #endif | |||
| 14767 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 14768 | "OOO|OOOOOOOi:_fblas.dsyr2",\ | |||
| 14769 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&lower_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 14770 | return NULL((void*)0); | |||
| 14771 | /*frompyobj*/ | |||
| 14772 | /* Processing variable lower */ | |||
| 14773 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 14774 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsyr2() 1st keyword (lower) can't be converted to int"); | |||
| 14775 | if (f2py_success) { | |||
| 14776 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","dsyr2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14777 | /* Processing variable alpha */ | |||
| 14778 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsyr2() 1st argument (alpha) can't be converted to double"); | |||
| 14779 | if (f2py_success) { | |||
| 14780 | /* Processing variable incx */ | |||
| 14781 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 14782 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dsyr2() 2nd keyword (incx) can't be converted to int"); | |||
| 14783 | if (f2py_success) { | |||
| 14784 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","dsyr2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr2:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14785 | /* Processing variable offx */ | |||
| 14786 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 14787 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dsyr2() 3rd keyword (offx) can't be converted to int"); | |||
| 14788 | if (f2py_success) { | |||
| 14789 | /* Processing variable incy */ | |||
| 14790 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 14791 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dsyr2() 4th keyword (incy) can't be converted to int"); | |||
| 14792 | if (f2py_success) { | |||
| 14793 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","4th keyword incy","dsyr2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr2:incy=%d", "(""incy>0||incy<0"") failed for " "4th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14794 | /* Processing variable offy */ | |||
| 14795 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 14796 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dsyr2() 5th keyword (offy) can't be converted to int"); | |||
| 14797 | if (f2py_success) { | |||
| 14798 | /* Processing variable x */ | |||
| 14799 | ; | |||
| 14800 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 14801 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 14802 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 14803 | if (!PyErr_Occurred()) | |||
| 14804 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.dsyr2 to C/Fortran array" ); | |||
| 14805 | } else { | |||
| 14806 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 14807 | ||||
| 14808 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 14809 | /* Processing variable y */ | |||
| 14810 | ; | |||
| 14811 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 14812 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 14813 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 14814 | if (!PyErr_Occurred()) | |||
| 14815 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.dsyr2 to C/Fortran array" ); | |||
| 14816 | } else { | |||
| 14817 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 14818 | ||||
| 14819 | CHECKARRAY(offy >= 0 && offy < len(y),"offy >= 0 && offy < len(y)","3rd argument y")if (!(offy >= 0 && offy < y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy >= 0 && offy < len(y)"") failed for " "3rd argument y"); } else { | |||
| 14820 | /* Processing variable n */ | |||
| 14821 | if (n_capi == Py_None(&_Py_NoneStruct)) n = ((len(x)x_Dims[0]-1-offx)/abs(incx)+1 <=(len(y)y_Dims[0]-1-offy)/abs(incy)+1 ?(len(x)x_Dims[0]-1-offx)/abs(incx)+1 :(len(y)y_Dims[0]-1-offy)/abs(incy)+1); else | |||
| 14822 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dsyr2() 6th keyword (n) can't be converted to int"); | |||
| 14823 | if (f2py_success) { | |||
| 14824 | CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1,"n <= (len(y)-1-offy)/abs(incy)+1","6th keyword n","dsyr2:n=%d",n)if (!(n <= (y_Dims[0]-1-offy)/abs(incy)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dsyr2:n=%d", "(""n <= (len(y)-1-offy)/abs(incy)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14825 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","6th keyword n","dsyr2:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dsyr2:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 14826 | CHECKSCALAR(n>=0,"n>=0","6th keyword n","dsyr2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr2:n=%d", "(""n>=0"") failed for ""6th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 14827 | /* Processing variable a */ | |||
| 14828 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 14829 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 14830 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 14831 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 14832 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 14833 | if (!PyErr_Occurred()) | |||
| 14834 | PyErr_SetString(_fblas_error,"failed in converting 7th keyword `a' of _fblas.dsyr2 to C/Fortran array" ); | |||
| 14835 | } else { | |||
| 14836 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 14837 | ||||
| 14838 | /*end of frompyobj*/ | |||
| 14839 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14840 | f2py_start_call_clock(); | |||
| 14841 | #endif | |||
| 14842 | /*callfortranroutine*/ | |||
| 14843 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,a,&n) ; | |||
| 14844 | /*(*f2py_func)(&alpha,x,y,&lower,&incx,&offx,&incy,&offy,&n,a);*/ | |||
| 14845 | if (PyErr_Occurred()) | |||
| 14846 | f2py_success = 0; | |||
| 14847 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14848 | f2py_stop_call_clock(); | |||
| 14849 | #endif | |||
| 14850 | /*end of callfortranroutine*/ | |||
| 14851 | if (f2py_success) { | |||
| 14852 | /*pyobjfrom*/ | |||
| 14853 | /*end of pyobjfrom*/ | |||
| 14854 | CFUNCSMESS("Building return value.\n"); | |||
| 14855 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 14856 | /*closepyobjfrom*/ | |||
| 14857 | /*end of closepyobjfrom*/ | |||
| 14858 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 14859 | /*cleanupfrompyobj*/ | |||
| 14860 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 14861 | /* End of cleaning variable a */ | |||
| 14862 | } /*CHECKSCALAR(n>=0)*/ | |||
| 14863 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 14864 | } /*CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1)*/ | |||
| 14865 | } /*if (f2py_success) of n*/ | |||
| 14866 | /* End of cleaning variable n */ | |||
| 14867 | } /*CHECKARRAY(offy >= 0 && offy < len(y))*/ | |||
| 14868 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 14869 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 14870 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 14871 | /* End of cleaning variable y */ | |||
| 14872 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 14873 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 14874 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 14875 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 14876 | /* End of cleaning variable x */ | |||
| 14877 | } /*if (f2py_success) of offy*/ | |||
| 14878 | /* End of cleaning variable offy */ | |||
| 14879 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 14880 | } /*if (f2py_success) of incy*/ | |||
| 14881 | /* End of cleaning variable incy */ | |||
| 14882 | } /*if (f2py_success) of offx*/ | |||
| 14883 | /* End of cleaning variable offx */ | |||
| 14884 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 14885 | } /*if (f2py_success) of incx*/ | |||
| 14886 | /* End of cleaning variable incx */ | |||
| 14887 | } /*if (f2py_success) of alpha*/ | |||
| 14888 | /* End of cleaning variable alpha */ | |||
| 14889 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 14890 | } /*if (f2py_success) of lower*/ | |||
| 14891 | /* End of cleaning variable lower */ | |||
| 14892 | /*end of cleanupfrompyobj*/ | |||
| 14893 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 14894 | /*routdebugfailure*/ | |||
| 14895 | } else { | |||
| 14896 | /*routdebugleave*/ | |||
| 14897 | } | |||
| 14898 | CFUNCSMESS("Freeing memory.\n"); | |||
| 14899 | /*freemem*/ | |||
| 14900 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14901 | f2py_stop_clock(); | |||
| 14902 | #endif | |||
| 14903 | return capi_buildvalue; | |||
| 14904 | } | |||
| 14905 | /******************************** end of dsyr2 ********************************/ | |||
| 14906 | ||||
| 14907 | /*********************************** cher2 ***********************************/ | |||
| 14908 | static char doc_f2py_rout__fblas_cher2[] = "\ | |||
| 14909 | a = cher2(alpha,x,y,[lower,incx,offx,incy,offy,n,a,overwrite_a])\n\nWrapper for ``cher2``.\ | |||
| 14910 | \n\nParameters\n----------\n" | |||
| 14911 | "alpha : input complex\n" | |||
| 14912 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 14913 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 14914 | "\nOther Parameters\n----------------\n" | |||
| 14915 | "lower : input int, optional\n Default: 0\n" | |||
| 14916 | "incx : input int, optional\n Default: 1\n" | |||
| 14917 | "offx : input int, optional\n Default: 0\n" | |||
| 14918 | "incy : input int, optional\n Default: 1\n" | |||
| 14919 | "offy : input int, optional\n Default: 0\n" | |||
| 14920 | "n : input int, optional\n Default: ((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1)\n" | |||
| 14921 | "a : input rank-2 array('F') with bounds (n,n)\n" | |||
| 14922 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 14923 | "\nReturns\n-------\n" | |||
| 14924 | "a : rank-2 array('F') with bounds (n,n)"; | |||
| 14925 | /* extern void F_FUNC(cher2,CHER2)(char*, F_INT*, complex_float*, complex_float*, F_INT*, complex_float*, F_INT*, complex_float*, F_INT* ); */ | |||
| 14926 | static PyObject *f2py_rout__fblas_cher2(const PyObject *capi_self, | |||
| 14927 | PyObject *capi_args, | |||
| 14928 | PyObject *capi_keywds, | |||
| 14929 | void (*f2py_func)(char*, F_INTint*, complex_float*, complex_float*, F_INTint*, complex_float*, F_INTint*, complex_float*, F_INTint* )) { | |||
| 14930 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 14931 | volatile int f2py_success = 1; | |||
| 14932 | /*decl*/ | |||
| 14933 | ||||
| 14934 | complex_float alpha; | |||
| 14935 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 14936 | complex_float *x = NULL((void*)0); | |||
| 14937 | npy_intp x_Dims[1] = {-1}; | |||
| 14938 | const int x_Rank = 1; | |||
| 14939 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 14940 | int capi_x_intent = 0; | |||
| 14941 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 14942 | complex_float *y = NULL((void*)0); | |||
| 14943 | npy_intp y_Dims[1] = {-1}; | |||
| 14944 | const int y_Rank = 1; | |||
| 14945 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 14946 | int capi_y_intent = 0; | |||
| 14947 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 14948 | int lower = 0; | |||
| 14949 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 14950 | int incx = 0; | |||
| 14951 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 14952 | int offx = 0; | |||
| 14953 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 14954 | int incy = 0; | |||
| 14955 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 14956 | int offy = 0; | |||
| 14957 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 14958 | int n = 0; | |||
| 14959 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 14960 | complex_float *a = NULL((void*)0); | |||
| 14961 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 14962 | const int a_Rank = 2; | |||
| 14963 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 14964 | int capi_a_intent = 0; | |||
| 14965 | int capi_overwrite_a = 0; | |||
| 14966 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 14967 | static char *capi_kwlist[] = {"alpha","x","y","lower","incx","offx","incy","offy","n","a","overwrite_a",NULL((void*)0)}; | |||
| 14968 | ||||
| 14969 | /*routdebugenter*/ | |||
| 14970 | #ifdef F2PY_REPORT_ATEXIT | |||
| 14971 | f2py_start_clock(); | |||
| 14972 | #endif | |||
| 14973 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 14974 | "OOO|OOOOOOOi:_fblas.cher2",\ | |||
| 14975 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&lower_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 14976 | return NULL((void*)0); | |||
| 14977 | /*frompyobj*/ | |||
| 14978 | /* Processing variable lower */ | |||
| 14979 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 14980 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.cher2() 1st keyword (lower) can't be converted to int"); | |||
| 14981 | if (f2py_success) { | |||
| 14982 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","cher2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14983 | /* Processing variable alpha */ | |||
| 14984 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cher2() 1st argument (alpha) can't be converted to complex_float"); | |||
| 14985 | if (f2py_success) { | |||
| 14986 | /* Processing variable incx */ | |||
| 14987 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 14988 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cher2() 2nd keyword (incx) can't be converted to int"); | |||
| 14989 | if (f2py_success) { | |||
| 14990 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","cher2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher2:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 14991 | /* Processing variable offx */ | |||
| 14992 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 14993 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cher2() 3rd keyword (offx) can't be converted to int"); | |||
| 14994 | if (f2py_success) { | |||
| 14995 | /* Processing variable incy */ | |||
| 14996 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 14997 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.cher2() 4th keyword (incy) can't be converted to int"); | |||
| 14998 | if (f2py_success) { | |||
| 14999 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","4th keyword incy","cher2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher2:incy=%d", "(""incy>0||incy<0"") failed for " "4th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15000 | /* Processing variable offy */ | |||
| 15001 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 15002 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.cher2() 5th keyword (offy) can't be converted to int"); | |||
| 15003 | if (f2py_success) { | |||
| 15004 | /* Processing variable x */ | |||
| 15005 | ; | |||
| 15006 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 15007 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 15008 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 15009 | if (!PyErr_Occurred()) | |||
| 15010 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.cher2 to C/Fortran array" ); | |||
| 15011 | } else { | |||
| 15012 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 15013 | ||||
| 15014 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 15015 | /* Processing variable y */ | |||
| 15016 | ; | |||
| 15017 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 15018 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 15019 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 15020 | if (!PyErr_Occurred()) | |||
| 15021 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.cher2 to C/Fortran array" ); | |||
| 15022 | } else { | |||
| 15023 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 15024 | ||||
| 15025 | CHECKARRAY(offy >= 0 && offy < len(y),"offy >= 0 && offy < len(y)","3rd argument y")if (!(offy >= 0 && offy < y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy >= 0 && offy < len(y)"") failed for " "3rd argument y"); } else { | |||
| 15026 | /* Processing variable n */ | |||
| 15027 | if (n_capi == Py_None(&_Py_NoneStruct)) n = ((len(x)x_Dims[0]-1-offx)/abs(incx)+1 <=(len(y)y_Dims[0]-1-offy)/abs(incy)+1 ?(len(x)x_Dims[0]-1-offx)/abs(incx)+1 :(len(y)y_Dims[0]-1-offy)/abs(incy)+1); else | |||
| 15028 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cher2() 6th keyword (n) can't be converted to int"); | |||
| 15029 | if (f2py_success) { | |||
| 15030 | CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1,"n <= (len(y)-1-offy)/abs(incy)+1","6th keyword n","cher2:n=%d",n)if (!(n <= (y_Dims[0]-1-offy)/abs(incy)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cher2:n=%d", "(""n <= (len(y)-1-offy)/abs(incy)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 15031 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","6th keyword n","cher2:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cher2:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 15032 | CHECKSCALAR(n>=0,"n>=0","6th keyword n","cher2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher2:n=%d", "(""n>=0"") failed for ""6th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 15033 | /* Processing variable a */ | |||
| 15034 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 15035 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 15036 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 15037 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 15038 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 15039 | if (!PyErr_Occurred()) | |||
| 15040 | PyErr_SetString(_fblas_error,"failed in converting 7th keyword `a' of _fblas.cher2 to C/Fortran array" ); | |||
| 15041 | } else { | |||
| 15042 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 15043 | ||||
| 15044 | /*end of frompyobj*/ | |||
| 15045 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15046 | f2py_start_call_clock(); | |||
| 15047 | #endif | |||
| 15048 | /*callfortranroutine*/ | |||
| 15049 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,a,&n) ; | |||
| 15050 | /*(*f2py_func)(&alpha,x,y,&lower,&incx,&offx,&incy,&offy,&n,a);*/ | |||
| 15051 | if (PyErr_Occurred()) | |||
| 15052 | f2py_success = 0; | |||
| 15053 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15054 | f2py_stop_call_clock(); | |||
| 15055 | #endif | |||
| 15056 | /*end of callfortranroutine*/ | |||
| 15057 | if (f2py_success) { | |||
| 15058 | /*pyobjfrom*/ | |||
| 15059 | /*end of pyobjfrom*/ | |||
| 15060 | CFUNCSMESS("Building return value.\n"); | |||
| 15061 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 15062 | /*closepyobjfrom*/ | |||
| 15063 | /*end of closepyobjfrom*/ | |||
| 15064 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 15065 | /*cleanupfrompyobj*/ | |||
| 15066 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 15067 | /* End of cleaning variable a */ | |||
| 15068 | } /*CHECKSCALAR(n>=0)*/ | |||
| 15069 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 15070 | } /*CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1)*/ | |||
| 15071 | } /*if (f2py_success) of n*/ | |||
| 15072 | /* End of cleaning variable n */ | |||
| 15073 | } /*CHECKARRAY(offy >= 0 && offy < len(y))*/ | |||
| 15074 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 15075 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 15076 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 15077 | /* End of cleaning variable y */ | |||
| 15078 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 15079 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 15080 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 15081 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 15082 | /* End of cleaning variable x */ | |||
| 15083 | } /*if (f2py_success) of offy*/ | |||
| 15084 | /* End of cleaning variable offy */ | |||
| 15085 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 15086 | } /*if (f2py_success) of incy*/ | |||
| 15087 | /* End of cleaning variable incy */ | |||
| 15088 | } /*if (f2py_success) of offx*/ | |||
| 15089 | /* End of cleaning variable offx */ | |||
| 15090 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 15091 | } /*if (f2py_success) of incx*/ | |||
| 15092 | /* End of cleaning variable incx */ | |||
| 15093 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 15094 | /* End of cleaning variable alpha */ | |||
| 15095 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 15096 | } /*if (f2py_success) of lower*/ | |||
| 15097 | /* End of cleaning variable lower */ | |||
| 15098 | /*end of cleanupfrompyobj*/ | |||
| 15099 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 15100 | /*routdebugfailure*/ | |||
| 15101 | } else { | |||
| 15102 | /*routdebugleave*/ | |||
| 15103 | } | |||
| 15104 | CFUNCSMESS("Freeing memory.\n"); | |||
| 15105 | /*freemem*/ | |||
| 15106 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15107 | f2py_stop_clock(); | |||
| 15108 | #endif | |||
| 15109 | return capi_buildvalue; | |||
| 15110 | } | |||
| 15111 | /******************************** end of cher2 ********************************/ | |||
| 15112 | ||||
| 15113 | /*********************************** zher2 ***********************************/ | |||
| 15114 | static char doc_f2py_rout__fblas_zher2[] = "\ | |||
| 15115 | a = zher2(alpha,x,y,[lower,incx,offx,incy,offy,n,a,overwrite_a])\n\nWrapper for ``zher2``.\ | |||
| 15116 | \n\nParameters\n----------\n" | |||
| 15117 | "alpha : input complex\n" | |||
| 15118 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 15119 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 15120 | "\nOther Parameters\n----------------\n" | |||
| 15121 | "lower : input int, optional\n Default: 0\n" | |||
| 15122 | "incx : input int, optional\n Default: 1\n" | |||
| 15123 | "offx : input int, optional\n Default: 0\n" | |||
| 15124 | "incy : input int, optional\n Default: 1\n" | |||
| 15125 | "offy : input int, optional\n Default: 0\n" | |||
| 15126 | "n : input int, optional\n Default: ((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1)\n" | |||
| 15127 | "a : input rank-2 array('D') with bounds (n,n)\n" | |||
| 15128 | "overwrite_a : input int, optional\n Default: 0\n" | |||
| 15129 | "\nReturns\n-------\n" | |||
| 15130 | "a : rank-2 array('D') with bounds (n,n)"; | |||
| 15131 | /* extern void F_FUNC(zher2,ZHER2)(char*, F_INT*, complex_double*, complex_double*, F_INT*, complex_double*, F_INT*, complex_double*, F_INT* ); */ | |||
| 15132 | static PyObject *f2py_rout__fblas_zher2(const PyObject *capi_self, | |||
| 15133 | PyObject *capi_args, | |||
| 15134 | PyObject *capi_keywds, | |||
| 15135 | void (*f2py_func)(char*, F_INTint*, complex_double*, complex_double*, F_INTint*, complex_double*, F_INTint*, complex_double*, F_INTint* )) { | |||
| 15136 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 15137 | volatile int f2py_success = 1; | |||
| 15138 | /*decl*/ | |||
| 15139 | ||||
| 15140 | complex_double alpha; | |||
| 15141 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 15142 | complex_double *x = NULL((void*)0); | |||
| 15143 | npy_intp x_Dims[1] = {-1}; | |||
| 15144 | const int x_Rank = 1; | |||
| 15145 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 15146 | int capi_x_intent = 0; | |||
| 15147 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 15148 | complex_double *y = NULL((void*)0); | |||
| 15149 | npy_intp y_Dims[1] = {-1}; | |||
| 15150 | const int y_Rank = 1; | |||
| 15151 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 15152 | int capi_y_intent = 0; | |||
| 15153 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 15154 | int lower = 0; | |||
| 15155 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 15156 | int incx = 0; | |||
| 15157 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 15158 | int offx = 0; | |||
| 15159 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 15160 | int incy = 0; | |||
| 15161 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 15162 | int offy = 0; | |||
| 15163 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 15164 | int n = 0; | |||
| 15165 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 15166 | complex_double *a = NULL((void*)0); | |||
| 15167 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 15168 | const int a_Rank = 2; | |||
| 15169 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 15170 | int capi_a_intent = 0; | |||
| 15171 | int capi_overwrite_a = 0; | |||
| 15172 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 15173 | static char *capi_kwlist[] = {"alpha","x","y","lower","incx","offx","incy","offy","n","a","overwrite_a",NULL((void*)0)}; | |||
| 15174 | ||||
| 15175 | /*routdebugenter*/ | |||
| 15176 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15177 | f2py_start_clock(); | |||
| 15178 | #endif | |||
| 15179 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 15180 | "OOO|OOOOOOOi:_fblas.zher2",\ | |||
| 15181 | capi_kwlist,&alpha_capi,&x_capi,&y_capi,&lower_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&n_capi,&a_capi,&capi_overwrite_a)) | |||
| 15182 | return NULL((void*)0); | |||
| 15183 | /*frompyobj*/ | |||
| 15184 | /* Processing variable lower */ | |||
| 15185 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 15186 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zher2() 1st keyword (lower) can't be converted to int"); | |||
| 15187 | if (f2py_success) { | |||
| 15188 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","1st keyword lower","zher2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "1st keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15189 | /* Processing variable alpha */ | |||
| 15190 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zher2() 1st argument (alpha) can't be converted to complex_double"); | |||
| 15191 | if (f2py_success) { | |||
| 15192 | /* Processing variable incx */ | |||
| 15193 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 15194 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zher2() 2nd keyword (incx) can't be converted to int"); | |||
| 15195 | if (f2py_success) { | |||
| 15196 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","zher2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher2:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15197 | /* Processing variable offx */ | |||
| 15198 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 15199 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zher2() 3rd keyword (offx) can't be converted to int"); | |||
| 15200 | if (f2py_success) { | |||
| 15201 | /* Processing variable incy */ | |||
| 15202 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 15203 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zher2() 4th keyword (incy) can't be converted to int"); | |||
| 15204 | if (f2py_success) { | |||
| 15205 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","4th keyword incy","zher2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher2:incy=%d", "(""incy>0||incy<0"") failed for " "4th keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15206 | /* Processing variable offy */ | |||
| 15207 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 15208 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zher2() 5th keyword (offy) can't be converted to int"); | |||
| 15209 | if (f2py_success) { | |||
| 15210 | /* Processing variable x */ | |||
| 15211 | ; | |||
| 15212 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 15213 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 15214 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 15215 | if (!PyErr_Occurred()) | |||
| 15216 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.zher2 to C/Fortran array" ); | |||
| 15217 | } else { | |||
| 15218 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 15219 | ||||
| 15220 | CHECKARRAY(offx >= 0 && offx < len(x),"offx >= 0 && offx < len(x)","2nd argument x")if (!(offx >= 0 && offx < x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx >= 0 && offx < len(x)"") failed for " "2nd argument x"); } else { | |||
| 15221 | /* Processing variable y */ | |||
| 15222 | ; | |||
| 15223 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 15224 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 15225 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 15226 | if (!PyErr_Occurred()) | |||
| 15227 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `y' of _fblas.zher2 to C/Fortran array" ); | |||
| 15228 | } else { | |||
| 15229 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 15230 | ||||
| 15231 | CHECKARRAY(offy >= 0 && offy < len(y),"offy >= 0 && offy < len(y)","3rd argument y")if (!(offy >= 0 && offy < y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy >= 0 && offy < len(y)"") failed for " "3rd argument y"); } else { | |||
| 15232 | /* Processing variable n */ | |||
| 15233 | if (n_capi == Py_None(&_Py_NoneStruct)) n = ((len(x)x_Dims[0]-1-offx)/abs(incx)+1 <=(len(y)y_Dims[0]-1-offy)/abs(incy)+1 ?(len(x)x_Dims[0]-1-offx)/abs(incx)+1 :(len(y)y_Dims[0]-1-offy)/abs(incy)+1); else | |||
| 15234 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zher2() 6th keyword (n) can't be converted to int"); | |||
| 15235 | if (f2py_success) { | |||
| 15236 | CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1,"n <= (len(y)-1-offy)/abs(incy)+1","6th keyword n","zher2:n=%d",n)if (!(n <= (y_Dims[0]-1-offy)/abs(incy)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zher2:n=%d", "(""n <= (len(y)-1-offy)/abs(incy)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 15237 | CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1,"n <= (len(x)-1-offx)/abs(incx)+1","6th keyword n","zher2:n=%d",n)if (!(n <= (x_Dims[0]-1-offx)/abs(incx)+1)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zher2:n=%d", "(""n <= (len(x)-1-offx)/abs(incx)+1" ") failed for ""6th keyword n", n); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 15238 | CHECKSCALAR(n>=0,"n>=0","6th keyword n","zher2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher2:n=%d", "(""n>=0"") failed for ""6th keyword n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 15239 | /* Processing variable a */ | |||
| 15240 | capi_a_intent |= (capi_overwrite_a?0:F2PY_INTENT_COPY32); | |||
| 15241 | a_Dims[0]=n,a_Dims[1]=n; | |||
| 15242 | capi_a_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 15243 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 15244 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 15245 | if (!PyErr_Occurred()) | |||
| 15246 | PyErr_SetString(_fblas_error,"failed in converting 7th keyword `a' of _fblas.zher2 to C/Fortran array" ); | |||
| 15247 | } else { | |||
| 15248 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 15249 | ||||
| 15250 | /*end of frompyobj*/ | |||
| 15251 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15252 | f2py_start_call_clock(); | |||
| 15253 | #endif | |||
| 15254 | /*callfortranroutine*/ | |||
| 15255 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,a,&n) ; | |||
| 15256 | /*(*f2py_func)(&alpha,x,y,&lower,&incx,&offx,&incy,&offy,&n,a);*/ | |||
| 15257 | if (PyErr_Occurred()) | |||
| 15258 | f2py_success = 0; | |||
| 15259 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15260 | f2py_stop_call_clock(); | |||
| 15261 | #endif | |||
| 15262 | /*end of callfortranroutine*/ | |||
| 15263 | if (f2py_success) { | |||
| 15264 | /*pyobjfrom*/ | |||
| 15265 | /*end of pyobjfrom*/ | |||
| 15266 | CFUNCSMESS("Building return value.\n"); | |||
| 15267 | capi_buildvalue = Py_BuildValue("N",capi_a_tmp); | |||
| 15268 | /*closepyobjfrom*/ | |||
| 15269 | /*end of closepyobjfrom*/ | |||
| 15270 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 15271 | /*cleanupfrompyobj*/ | |||
| 15272 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 15273 | /* End of cleaning variable a */ | |||
| 15274 | } /*CHECKSCALAR(n>=0)*/ | |||
| 15275 | } /*CHECKSCALAR(n <= (len(x)-1-offx)/abs(incx)+1)*/ | |||
| 15276 | } /*CHECKSCALAR(n <= (len(y)-1-offy)/abs(incy)+1)*/ | |||
| 15277 | } /*if (f2py_success) of n*/ | |||
| 15278 | /* End of cleaning variable n */ | |||
| 15279 | } /*CHECKARRAY(offy >= 0 && offy < len(y))*/ | |||
| 15280 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 15281 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 15282 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 15283 | /* End of cleaning variable y */ | |||
| 15284 | } /*CHECKARRAY(offx >= 0 && offx < len(x))*/ | |||
| 15285 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 15286 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 15287 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 15288 | /* End of cleaning variable x */ | |||
| 15289 | } /*if (f2py_success) of offy*/ | |||
| 15290 | /* End of cleaning variable offy */ | |||
| 15291 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 15292 | } /*if (f2py_success) of incy*/ | |||
| 15293 | /* End of cleaning variable incy */ | |||
| 15294 | } /*if (f2py_success) of offx*/ | |||
| 15295 | /* End of cleaning variable offx */ | |||
| 15296 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 15297 | } /*if (f2py_success) of incx*/ | |||
| 15298 | /* End of cleaning variable incx */ | |||
| 15299 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 15300 | /* End of cleaning variable alpha */ | |||
| 15301 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 15302 | } /*if (f2py_success) of lower*/ | |||
| 15303 | /* End of cleaning variable lower */ | |||
| 15304 | /*end of cleanupfrompyobj*/ | |||
| 15305 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 15306 | /*routdebugfailure*/ | |||
| 15307 | } else { | |||
| 15308 | /*routdebugleave*/ | |||
| 15309 | } | |||
| 15310 | CFUNCSMESS("Freeing memory.\n"); | |||
| 15311 | /*freemem*/ | |||
| 15312 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15313 | f2py_stop_clock(); | |||
| 15314 | #endif | |||
| 15315 | return capi_buildvalue; | |||
| 15316 | } | |||
| 15317 | /******************************** end of zher2 ********************************/ | |||
| 15318 | ||||
| 15319 | /************************************ sspr ************************************/ | |||
| 15320 | static char doc_f2py_rout__fblas_sspr[] = "\ | |||
| 15321 | apu = sspr(n,alpha,x,ap,[incx,offx,lower,overwrite_ap])\n\nWrapper for ``sspr``.\ | |||
| 15322 | \n\nParameters\n----------\n" | |||
| 15323 | "n : input int\n" | |||
| 15324 | "alpha : input float\n" | |||
| 15325 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 15326 | "ap : input rank-1 array('f') with bounds (*)\n" | |||
| 15327 | "\nOther Parameters\n----------------\n" | |||
| 15328 | "incx : input int, optional\n Default: 1\n" | |||
| 15329 | "offx : input int, optional\n Default: 0\n" | |||
| 15330 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 15331 | "lower : input int, optional\n Default: 0\n" | |||
| 15332 | "\nReturns\n-------\n" | |||
| 15333 | "apu : rank-1 array('f') with bounds (*) and ap storage"; | |||
| 15334 | /* extern void F_FUNC(sspr,SSPR)(char*,F_INT*,float*,float*,F_INT*,float* ); */ | |||
| 15335 | static PyObject *f2py_rout__fblas_sspr(const PyObject *capi_self, | |||
| 15336 | PyObject *capi_args, | |||
| 15337 | PyObject *capi_keywds, | |||
| 15338 | void (*f2py_func)(char*,F_INTint*,float*,float*,F_INTint*,float* )) { | |||
| 15339 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 15340 | volatile int f2py_success = 1; | |||
| 15341 | /*decl*/ | |||
| 15342 | ||||
| 15343 | int n = 0; | |||
| 15344 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 15345 | float alpha = 0; | |||
| 15346 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 15347 | float *x = NULL((void*)0); | |||
| 15348 | npy_intp x_Dims[1] = {-1}; | |||
| 15349 | const int x_Rank = 1; | |||
| 15350 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 15351 | int capi_x_intent = 0; | |||
| 15352 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 15353 | int incx = 0; | |||
| 15354 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 15355 | int offx = 0; | |||
| 15356 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 15357 | float *ap = NULL((void*)0); | |||
| 15358 | npy_intp ap_Dims[1] = {-1}; | |||
| 15359 | const int ap_Rank = 1; | |||
| 15360 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 15361 | int capi_ap_intent = 0; | |||
| 15362 | int capi_overwrite_ap = 0; | |||
| 15363 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 15364 | int lower = 0; | |||
| 15365 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 15366 | static char *capi_kwlist[] = {"n","alpha","x","ap","incx","offx","lower","overwrite_ap",NULL((void*)0)}; | |||
| 15367 | ||||
| 15368 | /*routdebugenter*/ | |||
| 15369 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15370 | f2py_start_clock(); | |||
| 15371 | #endif | |||
| 15372 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 15373 | "OOOO|OOOi:_fblas.sspr",\ | |||
| 15374 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&ap_capi,&incx_capi,&offx_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 15375 | return NULL((void*)0); | |||
| 15376 | /*frompyobj*/ | |||
| 15377 | /* Processing variable n */ | |||
| 15378 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sspr() 1st argument (n) can't be converted to int"); | |||
| 15379 | if (f2py_success) { | |||
| 15380 | CHECKSCALAR(n>=0,"n>=0","1st argument n","sspr:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 15381 | /* Processing variable lower */ | |||
| 15382 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 15383 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.sspr() 3rd keyword (lower) can't be converted to int"); | |||
| 15384 | if (f2py_success) { | |||
| 15385 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","sspr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15386 | /* Processing variable incx */ | |||
| 15387 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 15388 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sspr() 1st keyword (incx) can't be converted to int"); | |||
| 15389 | if (f2py_success) { | |||
| 15390 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","sspr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15391 | /* Processing variable offx */ | |||
| 15392 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 15393 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sspr() 2nd keyword (offx) can't be converted to int"); | |||
| 15394 | if (f2py_success) { | |||
| 15395 | /* Processing variable alpha */ | |||
| 15396 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sspr() 2nd argument (alpha) can't be converted to float"); | |||
| 15397 | if (f2py_success) { | |||
| 15398 | /* Processing variable x */ | |||
| 15399 | ; | |||
| 15400 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 15401 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 15402 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 15403 | if (!PyErr_Occurred()) | |||
| 15404 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.sspr to C/Fortran array" ); | |||
| 15405 | } else { | |||
| 15406 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 15407 | ||||
| 15408 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 15409 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 15410 | /* Processing variable ap */ | |||
| 15411 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 15412 | ; | |||
| 15413 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 15414 | capi_ap_tmp = array_from_pyobj(NPY_FLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 15415 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 15416 | if (!PyErr_Occurred()) | |||
| 15417 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `ap' of _fblas.sspr to C/Fortran array" ); | |||
| 15418 | } else { | |||
| 15419 | ap = (float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 15420 | ||||
| 15421 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","4th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""4th argument ap" ); } else { | |||
| 15422 | /*end of frompyobj*/ | |||
| 15423 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15424 | f2py_start_call_clock(); | |||
| 15425 | #endif | |||
| 15426 | /*callfortranroutine*/ | |||
| 15427 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,ap) ; | |||
| 15428 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,ap,&lower);*/ | |||
| 15429 | if (PyErr_Occurred()) | |||
| 15430 | f2py_success = 0; | |||
| 15431 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15432 | f2py_stop_call_clock(); | |||
| 15433 | #endif | |||
| 15434 | /*end of callfortranroutine*/ | |||
| 15435 | if (f2py_success) { | |||
| 15436 | /*pyobjfrom*/ | |||
| 15437 | /*end of pyobjfrom*/ | |||
| 15438 | CFUNCSMESS("Building return value.\n"); | |||
| 15439 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 15440 | /*closepyobjfrom*/ | |||
| 15441 | /*end of closepyobjfrom*/ | |||
| 15442 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 15443 | /*cleanupfrompyobj*/ | |||
| 15444 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 15445 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 15446 | /* End of cleaning variable ap */ | |||
| 15447 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 15448 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 15449 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 15450 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 15451 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 15452 | /* End of cleaning variable x */ | |||
| 15453 | } /*if (f2py_success) of alpha*/ | |||
| 15454 | /* End of cleaning variable alpha */ | |||
| 15455 | } /*if (f2py_success) of offx*/ | |||
| 15456 | /* End of cleaning variable offx */ | |||
| 15457 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 15458 | } /*if (f2py_success) of incx*/ | |||
| 15459 | /* End of cleaning variable incx */ | |||
| 15460 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 15461 | } /*if (f2py_success) of lower*/ | |||
| 15462 | /* End of cleaning variable lower */ | |||
| 15463 | } /*CHECKSCALAR(n>=0)*/ | |||
| 15464 | } /*if (f2py_success) of n*/ | |||
| 15465 | /* End of cleaning variable n */ | |||
| 15466 | /*end of cleanupfrompyobj*/ | |||
| 15467 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 15468 | /*routdebugfailure*/ | |||
| 15469 | } else { | |||
| 15470 | /*routdebugleave*/ | |||
| 15471 | } | |||
| 15472 | CFUNCSMESS("Freeing memory.\n"); | |||
| 15473 | /*freemem*/ | |||
| 15474 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15475 | f2py_stop_clock(); | |||
| 15476 | #endif | |||
| 15477 | return capi_buildvalue; | |||
| 15478 | } | |||
| 15479 | /******************************** end of sspr ********************************/ | |||
| 15480 | ||||
| 15481 | /************************************ dspr ************************************/ | |||
| 15482 | static char doc_f2py_rout__fblas_dspr[] = "\ | |||
| 15483 | apu = dspr(n,alpha,x,ap,[incx,offx,lower,overwrite_ap])\n\nWrapper for ``dspr``.\ | |||
| 15484 | \n\nParameters\n----------\n" | |||
| 15485 | "n : input int\n" | |||
| 15486 | "alpha : input float\n" | |||
| 15487 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 15488 | "ap : input rank-1 array('d') with bounds (*)\n" | |||
| 15489 | "\nOther Parameters\n----------------\n" | |||
| 15490 | "incx : input int, optional\n Default: 1\n" | |||
| 15491 | "offx : input int, optional\n Default: 0\n" | |||
| 15492 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 15493 | "lower : input int, optional\n Default: 0\n" | |||
| 15494 | "\nReturns\n-------\n" | |||
| 15495 | "apu : rank-1 array('d') with bounds (*) and ap storage"; | |||
| 15496 | /* extern void F_FUNC(dspr,DSPR)(char*,F_INT*,double*,double*,F_INT*,double* ); */ | |||
| 15497 | static PyObject *f2py_rout__fblas_dspr(const PyObject *capi_self, | |||
| 15498 | PyObject *capi_args, | |||
| 15499 | PyObject *capi_keywds, | |||
| 15500 | void (*f2py_func)(char*,F_INTint*,double*,double*,F_INTint*,double* )) { | |||
| 15501 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 15502 | volatile int f2py_success = 1; | |||
| 15503 | /*decl*/ | |||
| 15504 | ||||
| 15505 | int n = 0; | |||
| 15506 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 15507 | double alpha = 0; | |||
| 15508 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 15509 | double *x = NULL((void*)0); | |||
| 15510 | npy_intp x_Dims[1] = {-1}; | |||
| 15511 | const int x_Rank = 1; | |||
| 15512 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 15513 | int capi_x_intent = 0; | |||
| 15514 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 15515 | int incx = 0; | |||
| 15516 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 15517 | int offx = 0; | |||
| 15518 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 15519 | double *ap = NULL((void*)0); | |||
| 15520 | npy_intp ap_Dims[1] = {-1}; | |||
| 15521 | const int ap_Rank = 1; | |||
| 15522 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 15523 | int capi_ap_intent = 0; | |||
| 15524 | int capi_overwrite_ap = 0; | |||
| 15525 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 15526 | int lower = 0; | |||
| 15527 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 15528 | static char *capi_kwlist[] = {"n","alpha","x","ap","incx","offx","lower","overwrite_ap",NULL((void*)0)}; | |||
| 15529 | ||||
| 15530 | /*routdebugenter*/ | |||
| 15531 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15532 | f2py_start_clock(); | |||
| 15533 | #endif | |||
| 15534 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 15535 | "OOOO|OOOi:_fblas.dspr",\ | |||
| 15536 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&ap_capi,&incx_capi,&offx_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 15537 | return NULL((void*)0); | |||
| 15538 | /*frompyobj*/ | |||
| 15539 | /* Processing variable n */ | |||
| 15540 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dspr() 1st argument (n) can't be converted to int"); | |||
| 15541 | if (f2py_success) { | |||
| 15542 | CHECKSCALAR(n>=0,"n>=0","1st argument n","dspr:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 15543 | /* Processing variable lower */ | |||
| 15544 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 15545 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dspr() 3rd keyword (lower) can't be converted to int"); | |||
| 15546 | if (f2py_success) { | |||
| 15547 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","dspr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15548 | /* Processing variable incx */ | |||
| 15549 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 15550 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dspr() 1st keyword (incx) can't be converted to int"); | |||
| 15551 | if (f2py_success) { | |||
| 15552 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dspr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15553 | /* Processing variable offx */ | |||
| 15554 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 15555 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dspr() 2nd keyword (offx) can't be converted to int"); | |||
| 15556 | if (f2py_success) { | |||
| 15557 | /* Processing variable alpha */ | |||
| 15558 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dspr() 2nd argument (alpha) can't be converted to double"); | |||
| 15559 | if (f2py_success) { | |||
| 15560 | /* Processing variable x */ | |||
| 15561 | ; | |||
| 15562 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 15563 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 15564 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 15565 | if (!PyErr_Occurred()) | |||
| 15566 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dspr to C/Fortran array" ); | |||
| 15567 | } else { | |||
| 15568 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 15569 | ||||
| 15570 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 15571 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 15572 | /* Processing variable ap */ | |||
| 15573 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 15574 | ; | |||
| 15575 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 15576 | capi_ap_tmp = array_from_pyobj(NPY_DOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 15577 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 15578 | if (!PyErr_Occurred()) | |||
| 15579 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `ap' of _fblas.dspr to C/Fortran array" ); | |||
| 15580 | } else { | |||
| 15581 | ap = (double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 15582 | ||||
| 15583 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","4th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""4th argument ap" ); } else { | |||
| 15584 | /*end of frompyobj*/ | |||
| 15585 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15586 | f2py_start_call_clock(); | |||
| 15587 | #endif | |||
| 15588 | /*callfortranroutine*/ | |||
| 15589 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,ap) ; | |||
| 15590 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,ap,&lower);*/ | |||
| 15591 | if (PyErr_Occurred()) | |||
| 15592 | f2py_success = 0; | |||
| 15593 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15594 | f2py_stop_call_clock(); | |||
| 15595 | #endif | |||
| 15596 | /*end of callfortranroutine*/ | |||
| 15597 | if (f2py_success) { | |||
| 15598 | /*pyobjfrom*/ | |||
| 15599 | /*end of pyobjfrom*/ | |||
| 15600 | CFUNCSMESS("Building return value.\n"); | |||
| 15601 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 15602 | /*closepyobjfrom*/ | |||
| 15603 | /*end of closepyobjfrom*/ | |||
| 15604 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 15605 | /*cleanupfrompyobj*/ | |||
| 15606 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 15607 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 15608 | /* End of cleaning variable ap */ | |||
| 15609 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 15610 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 15611 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 15612 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 15613 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 15614 | /* End of cleaning variable x */ | |||
| 15615 | } /*if (f2py_success) of alpha*/ | |||
| 15616 | /* End of cleaning variable alpha */ | |||
| 15617 | } /*if (f2py_success) of offx*/ | |||
| 15618 | /* End of cleaning variable offx */ | |||
| 15619 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 15620 | } /*if (f2py_success) of incx*/ | |||
| 15621 | /* End of cleaning variable incx */ | |||
| 15622 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 15623 | } /*if (f2py_success) of lower*/ | |||
| 15624 | /* End of cleaning variable lower */ | |||
| 15625 | } /*CHECKSCALAR(n>=0)*/ | |||
| 15626 | } /*if (f2py_success) of n*/ | |||
| 15627 | /* End of cleaning variable n */ | |||
| 15628 | /*end of cleanupfrompyobj*/ | |||
| 15629 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 15630 | /*routdebugfailure*/ | |||
| 15631 | } else { | |||
| 15632 | /*routdebugleave*/ | |||
| 15633 | } | |||
| 15634 | CFUNCSMESS("Freeing memory.\n"); | |||
| 15635 | /*freemem*/ | |||
| 15636 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15637 | f2py_stop_clock(); | |||
| 15638 | #endif | |||
| 15639 | return capi_buildvalue; | |||
| 15640 | } | |||
| 15641 | /******************************** end of dspr ********************************/ | |||
| 15642 | ||||
| 15643 | /************************************ cspr ************************************/ | |||
| 15644 | static char doc_f2py_rout__fblas_cspr[] = "\ | |||
| 15645 | apu = cspr(n,alpha,x,ap,[incx,offx,lower,overwrite_ap])\n\nWrapper for ``cspr``.\ | |||
| 15646 | \n\nParameters\n----------\n" | |||
| 15647 | "n : input int\n" | |||
| 15648 | "alpha : input complex\n" | |||
| 15649 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 15650 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 15651 | "\nOther Parameters\n----------------\n" | |||
| 15652 | "incx : input int, optional\n Default: 1\n" | |||
| 15653 | "offx : input int, optional\n Default: 0\n" | |||
| 15654 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 15655 | "lower : input int, optional\n Default: 0\n" | |||
| 15656 | "\nReturns\n-------\n" | |||
| 15657 | "apu : rank-1 array('F') with bounds (*) and ap storage"; | |||
| 15658 | /* extern void F_FUNC(cspr,CSPR)(char*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float* ); */ | |||
| 15659 | static PyObject *f2py_rout__fblas_cspr(const PyObject *capi_self, | |||
| 15660 | PyObject *capi_args, | |||
| 15661 | PyObject *capi_keywds, | |||
| 15662 | void (*f2py_func)(char*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float* )) { | |||
| 15663 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 15664 | volatile int f2py_success = 1; | |||
| 15665 | /*decl*/ | |||
| 15666 | ||||
| 15667 | int n = 0; | |||
| 15668 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 15669 | complex_float alpha; | |||
| 15670 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 15671 | complex_float *x = NULL((void*)0); | |||
| 15672 | npy_intp x_Dims[1] = {-1}; | |||
| 15673 | const int x_Rank = 1; | |||
| 15674 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 15675 | int capi_x_intent = 0; | |||
| 15676 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 15677 | int incx = 0; | |||
| 15678 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 15679 | int offx = 0; | |||
| 15680 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 15681 | complex_float *ap = NULL((void*)0); | |||
| 15682 | npy_intp ap_Dims[1] = {-1}; | |||
| 15683 | const int ap_Rank = 1; | |||
| 15684 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 15685 | int capi_ap_intent = 0; | |||
| 15686 | int capi_overwrite_ap = 0; | |||
| 15687 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 15688 | int lower = 0; | |||
| 15689 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 15690 | static char *capi_kwlist[] = {"n","alpha","x","ap","incx","offx","lower","overwrite_ap",NULL((void*)0)}; | |||
| 15691 | ||||
| 15692 | /*routdebugenter*/ | |||
| 15693 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15694 | f2py_start_clock(); | |||
| 15695 | #endif | |||
| 15696 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 15697 | "OOOO|OOOi:_fblas.cspr",\ | |||
| 15698 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&ap_capi,&incx_capi,&offx_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 15699 | return NULL((void*)0); | |||
| 15700 | /*frompyobj*/ | |||
| 15701 | /* Processing variable n */ | |||
| 15702 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.cspr() 1st argument (n) can't be converted to int"); | |||
| 15703 | if (f2py_success) { | |||
| 15704 | CHECKSCALAR(n>=0,"n>=0","1st argument n","cspr:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspr:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 15705 | /* Processing variable lower */ | |||
| 15706 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 15707 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.cspr() 3rd keyword (lower) can't be converted to int"); | |||
| 15708 | if (f2py_success) { | |||
| 15709 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","cspr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15710 | /* Processing variable incx */ | |||
| 15711 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 15712 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.cspr() 1st keyword (incx) can't be converted to int"); | |||
| 15713 | if (f2py_success) { | |||
| 15714 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","cspr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cspr:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15715 | /* Processing variable offx */ | |||
| 15716 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 15717 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.cspr() 2nd keyword (offx) can't be converted to int"); | |||
| 15718 | if (f2py_success) { | |||
| 15719 | /* Processing variable alpha */ | |||
| 15720 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cspr() 2nd argument (alpha) can't be converted to complex_float"); | |||
| 15721 | if (f2py_success) { | |||
| 15722 | /* Processing variable x */ | |||
| 15723 | ; | |||
| 15724 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 15725 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 15726 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 15727 | if (!PyErr_Occurred()) | |||
| 15728 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.cspr to C/Fortran array" ); | |||
| 15729 | } else { | |||
| 15730 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 15731 | ||||
| 15732 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 15733 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 15734 | /* Processing variable ap */ | |||
| 15735 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 15736 | ; | |||
| 15737 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 15738 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 15739 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 15740 | if (!PyErr_Occurred()) | |||
| 15741 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `ap' of _fblas.cspr to C/Fortran array" ); | |||
| 15742 | } else { | |||
| 15743 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 15744 | ||||
| 15745 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","4th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""4th argument ap" ); } else { | |||
| 15746 | /*end of frompyobj*/ | |||
| 15747 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15748 | f2py_start_call_clock(); | |||
| 15749 | #endif | |||
| 15750 | /*callfortranroutine*/ | |||
| 15751 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,ap) ; | |||
| 15752 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,ap,&lower);*/ | |||
| 15753 | if (PyErr_Occurred()) | |||
| 15754 | f2py_success = 0; | |||
| 15755 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15756 | f2py_stop_call_clock(); | |||
| 15757 | #endif | |||
| 15758 | /*end of callfortranroutine*/ | |||
| 15759 | if (f2py_success) { | |||
| 15760 | /*pyobjfrom*/ | |||
| 15761 | /*end of pyobjfrom*/ | |||
| 15762 | CFUNCSMESS("Building return value.\n"); | |||
| 15763 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 15764 | /*closepyobjfrom*/ | |||
| 15765 | /*end of closepyobjfrom*/ | |||
| 15766 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 15767 | /*cleanupfrompyobj*/ | |||
| 15768 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 15769 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 15770 | /* End of cleaning variable ap */ | |||
| 15771 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 15772 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 15773 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 15774 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 15775 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 15776 | /* End of cleaning variable x */ | |||
| 15777 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 15778 | /* End of cleaning variable alpha */ | |||
| 15779 | } /*if (f2py_success) of offx*/ | |||
| 15780 | /* End of cleaning variable offx */ | |||
| 15781 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 15782 | } /*if (f2py_success) of incx*/ | |||
| 15783 | /* End of cleaning variable incx */ | |||
| 15784 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 15785 | } /*if (f2py_success) of lower*/ | |||
| 15786 | /* End of cleaning variable lower */ | |||
| 15787 | } /*CHECKSCALAR(n>=0)*/ | |||
| 15788 | } /*if (f2py_success) of n*/ | |||
| 15789 | /* End of cleaning variable n */ | |||
| 15790 | /*end of cleanupfrompyobj*/ | |||
| 15791 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 15792 | /*routdebugfailure*/ | |||
| 15793 | } else { | |||
| 15794 | /*routdebugleave*/ | |||
| 15795 | } | |||
| 15796 | CFUNCSMESS("Freeing memory.\n"); | |||
| 15797 | /*freemem*/ | |||
| 15798 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15799 | f2py_stop_clock(); | |||
| 15800 | #endif | |||
| 15801 | return capi_buildvalue; | |||
| 15802 | } | |||
| 15803 | /******************************** end of cspr ********************************/ | |||
| 15804 | ||||
| 15805 | /************************************ zspr ************************************/ | |||
| 15806 | static char doc_f2py_rout__fblas_zspr[] = "\ | |||
| 15807 | apu = zspr(n,alpha,x,ap,[incx,offx,lower,overwrite_ap])\n\nWrapper for ``zspr``.\ | |||
| 15808 | \n\nParameters\n----------\n" | |||
| 15809 | "n : input int\n" | |||
| 15810 | "alpha : input complex\n" | |||
| 15811 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 15812 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 15813 | "\nOther Parameters\n----------------\n" | |||
| 15814 | "incx : input int, optional\n Default: 1\n" | |||
| 15815 | "offx : input int, optional\n Default: 0\n" | |||
| 15816 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 15817 | "lower : input int, optional\n Default: 0\n" | |||
| 15818 | "\nReturns\n-------\n" | |||
| 15819 | "apu : rank-1 array('D') with bounds (*) and ap storage"; | |||
| 15820 | /* extern void F_FUNC(zspr,ZSPR)(char*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double* ); */ | |||
| 15821 | static PyObject *f2py_rout__fblas_zspr(const PyObject *capi_self, | |||
| 15822 | PyObject *capi_args, | |||
| 15823 | PyObject *capi_keywds, | |||
| 15824 | void (*f2py_func)(char*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double* )) { | |||
| 15825 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 15826 | volatile int f2py_success = 1; | |||
| 15827 | /*decl*/ | |||
| 15828 | ||||
| 15829 | int n = 0; | |||
| 15830 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 15831 | complex_double alpha; | |||
| 15832 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 15833 | complex_double *x = NULL((void*)0); | |||
| 15834 | npy_intp x_Dims[1] = {-1}; | |||
| 15835 | const int x_Rank = 1; | |||
| 15836 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 15837 | int capi_x_intent = 0; | |||
| 15838 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 15839 | int incx = 0; | |||
| 15840 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 15841 | int offx = 0; | |||
| 15842 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 15843 | complex_double *ap = NULL((void*)0); | |||
| 15844 | npy_intp ap_Dims[1] = {-1}; | |||
| 15845 | const int ap_Rank = 1; | |||
| 15846 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 15847 | int capi_ap_intent = 0; | |||
| 15848 | int capi_overwrite_ap = 0; | |||
| 15849 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 15850 | int lower = 0; | |||
| 15851 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 15852 | static char *capi_kwlist[] = {"n","alpha","x","ap","incx","offx","lower","overwrite_ap",NULL((void*)0)}; | |||
| 15853 | ||||
| 15854 | /*routdebugenter*/ | |||
| 15855 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15856 | f2py_start_clock(); | |||
| 15857 | #endif | |||
| 15858 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 15859 | "OOOO|OOOi:_fblas.zspr",\ | |||
| 15860 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&ap_capi,&incx_capi,&offx_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 15861 | return NULL((void*)0); | |||
| 15862 | /*frompyobj*/ | |||
| 15863 | /* Processing variable n */ | |||
| 15864 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zspr() 1st argument (n) can't be converted to int"); | |||
| 15865 | if (f2py_success) { | |||
| 15866 | CHECKSCALAR(n>=0,"n>=0","1st argument n","zspr:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspr:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 15867 | /* Processing variable lower */ | |||
| 15868 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 15869 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zspr() 3rd keyword (lower) can't be converted to int"); | |||
| 15870 | if (f2py_success) { | |||
| 15871 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","zspr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15872 | /* Processing variable incx */ | |||
| 15873 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 15874 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zspr() 1st keyword (incx) can't be converted to int"); | |||
| 15875 | if (f2py_success) { | |||
| 15876 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zspr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zspr:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 15877 | /* Processing variable offx */ | |||
| 15878 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 15879 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zspr() 2nd keyword (offx) can't be converted to int"); | |||
| 15880 | if (f2py_success) { | |||
| 15881 | /* Processing variable alpha */ | |||
| 15882 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zspr() 2nd argument (alpha) can't be converted to complex_double"); | |||
| 15883 | if (f2py_success) { | |||
| 15884 | /* Processing variable x */ | |||
| 15885 | ; | |||
| 15886 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 15887 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 15888 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 15889 | if (!PyErr_Occurred()) | |||
| 15890 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.zspr to C/Fortran array" ); | |||
| 15891 | } else { | |||
| 15892 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 15893 | ||||
| 15894 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 15895 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 15896 | /* Processing variable ap */ | |||
| 15897 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 15898 | ; | |||
| 15899 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 15900 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 15901 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 15902 | if (!PyErr_Occurred()) | |||
| 15903 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `ap' of _fblas.zspr to C/Fortran array" ); | |||
| 15904 | } else { | |||
| 15905 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 15906 | ||||
| 15907 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","4th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""4th argument ap" ); } else { | |||
| 15908 | /*end of frompyobj*/ | |||
| 15909 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15910 | f2py_start_call_clock(); | |||
| 15911 | #endif | |||
| 15912 | /*callfortranroutine*/ | |||
| 15913 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,ap) ; | |||
| 15914 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,ap,&lower);*/ | |||
| 15915 | if (PyErr_Occurred()) | |||
| 15916 | f2py_success = 0; | |||
| 15917 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15918 | f2py_stop_call_clock(); | |||
| 15919 | #endif | |||
| 15920 | /*end of callfortranroutine*/ | |||
| 15921 | if (f2py_success) { | |||
| 15922 | /*pyobjfrom*/ | |||
| 15923 | /*end of pyobjfrom*/ | |||
| 15924 | CFUNCSMESS("Building return value.\n"); | |||
| 15925 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 15926 | /*closepyobjfrom*/ | |||
| 15927 | /*end of closepyobjfrom*/ | |||
| 15928 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 15929 | /*cleanupfrompyobj*/ | |||
| 15930 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 15931 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 15932 | /* End of cleaning variable ap */ | |||
| 15933 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 15934 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 15935 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 15936 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 15937 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 15938 | /* End of cleaning variable x */ | |||
| 15939 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 15940 | /* End of cleaning variable alpha */ | |||
| 15941 | } /*if (f2py_success) of offx*/ | |||
| 15942 | /* End of cleaning variable offx */ | |||
| 15943 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 15944 | } /*if (f2py_success) of incx*/ | |||
| 15945 | /* End of cleaning variable incx */ | |||
| 15946 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 15947 | } /*if (f2py_success) of lower*/ | |||
| 15948 | /* End of cleaning variable lower */ | |||
| 15949 | } /*CHECKSCALAR(n>=0)*/ | |||
| 15950 | } /*if (f2py_success) of n*/ | |||
| 15951 | /* End of cleaning variable n */ | |||
| 15952 | /*end of cleanupfrompyobj*/ | |||
| 15953 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 15954 | /*routdebugfailure*/ | |||
| 15955 | } else { | |||
| 15956 | /*routdebugleave*/ | |||
| 15957 | } | |||
| 15958 | CFUNCSMESS("Freeing memory.\n"); | |||
| 15959 | /*freemem*/ | |||
| 15960 | #ifdef F2PY_REPORT_ATEXIT | |||
| 15961 | f2py_stop_clock(); | |||
| 15962 | #endif | |||
| 15963 | return capi_buildvalue; | |||
| 15964 | } | |||
| 15965 | /******************************** end of zspr ********************************/ | |||
| 15966 | ||||
| 15967 | /************************************ chpr ************************************/ | |||
| 15968 | static char doc_f2py_rout__fblas_chpr[] = "\ | |||
| 15969 | apu = chpr(n,alpha,x,ap,[incx,offx,lower,overwrite_ap])\n\nWrapper for ``chpr``.\ | |||
| 15970 | \n\nParameters\n----------\n" | |||
| 15971 | "n : input int\n" | |||
| 15972 | "alpha : input float\n" | |||
| 15973 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 15974 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 15975 | "\nOther Parameters\n----------------\n" | |||
| 15976 | "incx : input int, optional\n Default: 1\n" | |||
| 15977 | "offx : input int, optional\n Default: 0\n" | |||
| 15978 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 15979 | "lower : input int, optional\n Default: 0\n" | |||
| 15980 | "\nReturns\n-------\n" | |||
| 15981 | "apu : rank-1 array('F') with bounds (*) and ap storage"; | |||
| 15982 | /* extern void F_FUNC(chpr,CHPR)(char*,F_INT*,float*,complex_float*,F_INT*,complex_float* ); */ | |||
| 15983 | static PyObject *f2py_rout__fblas_chpr(const PyObject *capi_self, | |||
| 15984 | PyObject *capi_args, | |||
| 15985 | PyObject *capi_keywds, | |||
| 15986 | void (*f2py_func)(char*,F_INTint*,float*,complex_float*,F_INTint*,complex_float* )) { | |||
| 15987 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 15988 | volatile int f2py_success = 1; | |||
| 15989 | /*decl*/ | |||
| 15990 | ||||
| 15991 | int n = 0; | |||
| 15992 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 15993 | float alpha = 0; | |||
| 15994 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 15995 | complex_float *x = NULL((void*)0); | |||
| 15996 | npy_intp x_Dims[1] = {-1}; | |||
| 15997 | const int x_Rank = 1; | |||
| 15998 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 15999 | int capi_x_intent = 0; | |||
| 16000 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 16001 | int incx = 0; | |||
| 16002 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 16003 | int offx = 0; | |||
| 16004 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 16005 | complex_float *ap = NULL((void*)0); | |||
| 16006 | npy_intp ap_Dims[1] = {-1}; | |||
| 16007 | const int ap_Rank = 1; | |||
| 16008 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 16009 | int capi_ap_intent = 0; | |||
| 16010 | int capi_overwrite_ap = 0; | |||
| 16011 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 16012 | int lower = 0; | |||
| 16013 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 16014 | static char *capi_kwlist[] = {"n","alpha","x","ap","incx","offx","lower","overwrite_ap",NULL((void*)0)}; | |||
| 16015 | ||||
| 16016 | /*routdebugenter*/ | |||
| 16017 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16018 | f2py_start_clock(); | |||
| 16019 | #endif | |||
| 16020 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 16021 | "OOOO|OOOi:_fblas.chpr",\ | |||
| 16022 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&ap_capi,&incx_capi,&offx_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 16023 | return NULL((void*)0); | |||
| 16024 | /*frompyobj*/ | |||
| 16025 | /* Processing variable n */ | |||
| 16026 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.chpr() 1st argument (n) can't be converted to int"); | |||
| 16027 | if (f2py_success) { | |||
| 16028 | CHECKSCALAR(n>=0,"n>=0","1st argument n","chpr:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 16029 | /* Processing variable lower */ | |||
| 16030 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 16031 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.chpr() 3rd keyword (lower) can't be converted to int"); | |||
| 16032 | if (f2py_success) { | |||
| 16033 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","chpr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16034 | /* Processing variable incx */ | |||
| 16035 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 16036 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.chpr() 1st keyword (incx) can't be converted to int"); | |||
| 16037 | if (f2py_success) { | |||
| 16038 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","chpr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16039 | /* Processing variable offx */ | |||
| 16040 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 16041 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.chpr() 2nd keyword (offx) can't be converted to int"); | |||
| 16042 | if (f2py_success) { | |||
| 16043 | /* Processing variable alpha */ | |||
| 16044 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.chpr() 2nd argument (alpha) can't be converted to float"); | |||
| 16045 | if (f2py_success) { | |||
| 16046 | /* Processing variable x */ | |||
| 16047 | ; | |||
| 16048 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 16049 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 16050 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 16051 | if (!PyErr_Occurred()) | |||
| 16052 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.chpr to C/Fortran array" ); | |||
| 16053 | } else { | |||
| 16054 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 16055 | ||||
| 16056 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 16057 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 16058 | /* Processing variable ap */ | |||
| 16059 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 16060 | ; | |||
| 16061 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 16062 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 16063 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 16064 | if (!PyErr_Occurred()) | |||
| 16065 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `ap' of _fblas.chpr to C/Fortran array" ); | |||
| 16066 | } else { | |||
| 16067 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 16068 | ||||
| 16069 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","4th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""4th argument ap" ); } else { | |||
| 16070 | /*end of frompyobj*/ | |||
| 16071 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16072 | f2py_start_call_clock(); | |||
| 16073 | #endif | |||
| 16074 | /*callfortranroutine*/ | |||
| 16075 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,ap) ; | |||
| 16076 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,ap,&lower);*/ | |||
| 16077 | if (PyErr_Occurred()) | |||
| 16078 | f2py_success = 0; | |||
| 16079 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16080 | f2py_stop_call_clock(); | |||
| 16081 | #endif | |||
| 16082 | /*end of callfortranroutine*/ | |||
| 16083 | if (f2py_success) { | |||
| 16084 | /*pyobjfrom*/ | |||
| 16085 | /*end of pyobjfrom*/ | |||
| 16086 | CFUNCSMESS("Building return value.\n"); | |||
| 16087 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 16088 | /*closepyobjfrom*/ | |||
| 16089 | /*end of closepyobjfrom*/ | |||
| 16090 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 16091 | /*cleanupfrompyobj*/ | |||
| 16092 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 16093 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 16094 | /* End of cleaning variable ap */ | |||
| 16095 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 16096 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 16097 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 16098 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 16099 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 16100 | /* End of cleaning variable x */ | |||
| 16101 | } /*if (f2py_success) of alpha*/ | |||
| 16102 | /* End of cleaning variable alpha */ | |||
| 16103 | } /*if (f2py_success) of offx*/ | |||
| 16104 | /* End of cleaning variable offx */ | |||
| 16105 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 16106 | } /*if (f2py_success) of incx*/ | |||
| 16107 | /* End of cleaning variable incx */ | |||
| 16108 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 16109 | } /*if (f2py_success) of lower*/ | |||
| 16110 | /* End of cleaning variable lower */ | |||
| 16111 | } /*CHECKSCALAR(n>=0)*/ | |||
| 16112 | } /*if (f2py_success) of n*/ | |||
| 16113 | /* End of cleaning variable n */ | |||
| 16114 | /*end of cleanupfrompyobj*/ | |||
| 16115 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 16116 | /*routdebugfailure*/ | |||
| 16117 | } else { | |||
| 16118 | /*routdebugleave*/ | |||
| 16119 | } | |||
| 16120 | CFUNCSMESS("Freeing memory.\n"); | |||
| 16121 | /*freemem*/ | |||
| 16122 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16123 | f2py_stop_clock(); | |||
| 16124 | #endif | |||
| 16125 | return capi_buildvalue; | |||
| 16126 | } | |||
| 16127 | /******************************** end of chpr ********************************/ | |||
| 16128 | ||||
| 16129 | /************************************ zhpr ************************************/ | |||
| 16130 | static char doc_f2py_rout__fblas_zhpr[] = "\ | |||
| 16131 | apu = zhpr(n,alpha,x,ap,[incx,offx,lower,overwrite_ap])\n\nWrapper for ``zhpr``.\ | |||
| 16132 | \n\nParameters\n----------\n" | |||
| 16133 | "n : input int\n" | |||
| 16134 | "alpha : input float\n" | |||
| 16135 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 16136 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 16137 | "\nOther Parameters\n----------------\n" | |||
| 16138 | "incx : input int, optional\n Default: 1\n" | |||
| 16139 | "offx : input int, optional\n Default: 0\n" | |||
| 16140 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 16141 | "lower : input int, optional\n Default: 0\n" | |||
| 16142 | "\nReturns\n-------\n" | |||
| 16143 | "apu : rank-1 array('D') with bounds (*) and ap storage"; | |||
| 16144 | /* extern void F_FUNC(zhpr,ZHPR)(char*,F_INT*,double*,complex_double*,F_INT*,complex_double* ); */ | |||
| 16145 | static PyObject *f2py_rout__fblas_zhpr(const PyObject *capi_self, | |||
| 16146 | PyObject *capi_args, | |||
| 16147 | PyObject *capi_keywds, | |||
| 16148 | void (*f2py_func)(char*,F_INTint*,double*,complex_double*,F_INTint*,complex_double* )) { | |||
| 16149 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 16150 | volatile int f2py_success = 1; | |||
| 16151 | /*decl*/ | |||
| 16152 | ||||
| 16153 | int n = 0; | |||
| 16154 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 16155 | double alpha = 0; | |||
| 16156 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 16157 | complex_double *x = NULL((void*)0); | |||
| 16158 | npy_intp x_Dims[1] = {-1}; | |||
| 16159 | const int x_Rank = 1; | |||
| 16160 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 16161 | int capi_x_intent = 0; | |||
| 16162 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 16163 | int incx = 0; | |||
| 16164 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 16165 | int offx = 0; | |||
| 16166 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 16167 | complex_double *ap = NULL((void*)0); | |||
| 16168 | npy_intp ap_Dims[1] = {-1}; | |||
| 16169 | const int ap_Rank = 1; | |||
| 16170 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 16171 | int capi_ap_intent = 0; | |||
| 16172 | int capi_overwrite_ap = 0; | |||
| 16173 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 16174 | int lower = 0; | |||
| 16175 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 16176 | static char *capi_kwlist[] = {"n","alpha","x","ap","incx","offx","lower","overwrite_ap",NULL((void*)0)}; | |||
| 16177 | ||||
| 16178 | /*routdebugenter*/ | |||
| 16179 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16180 | f2py_start_clock(); | |||
| 16181 | #endif | |||
| 16182 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 16183 | "OOOO|OOOi:_fblas.zhpr",\ | |||
| 16184 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&ap_capi,&incx_capi,&offx_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 16185 | return NULL((void*)0); | |||
| 16186 | /*frompyobj*/ | |||
| 16187 | /* Processing variable n */ | |||
| 16188 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zhpr() 1st argument (n) can't be converted to int"); | |||
| 16189 | if (f2py_success) { | |||
| 16190 | CHECKSCALAR(n>=0,"n>=0","1st argument n","zhpr:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 16191 | /* Processing variable lower */ | |||
| 16192 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 16193 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zhpr() 3rd keyword (lower) can't be converted to int"); | |||
| 16194 | if (f2py_success) { | |||
| 16195 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","zhpr:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16196 | /* Processing variable incx */ | |||
| 16197 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 16198 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zhpr() 1st keyword (incx) can't be converted to int"); | |||
| 16199 | if (f2py_success) { | |||
| 16200 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zhpr:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16201 | /* Processing variable offx */ | |||
| 16202 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 16203 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zhpr() 2nd keyword (offx) can't be converted to int"); | |||
| 16204 | if (f2py_success) { | |||
| 16205 | /* Processing variable alpha */ | |||
| 16206 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.zhpr() 2nd argument (alpha) can't be converted to double"); | |||
| 16207 | if (f2py_success) { | |||
| 16208 | /* Processing variable x */ | |||
| 16209 | ; | |||
| 16210 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 16211 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 16212 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 16213 | if (!PyErr_Occurred()) | |||
| 16214 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.zhpr to C/Fortran array" ); | |||
| 16215 | } else { | |||
| 16216 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 16217 | ||||
| 16218 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 16219 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 16220 | /* Processing variable ap */ | |||
| 16221 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 16222 | ; | |||
| 16223 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 16224 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 16225 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 16226 | if (!PyErr_Occurred()) | |||
| 16227 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `ap' of _fblas.zhpr to C/Fortran array" ); | |||
| 16228 | } else { | |||
| 16229 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 16230 | ||||
| 16231 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","4th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""4th argument ap" ); } else { | |||
| 16232 | /*end of frompyobj*/ | |||
| 16233 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16234 | f2py_start_call_clock(); | |||
| 16235 | #endif | |||
| 16236 | /*callfortranroutine*/ | |||
| 16237 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,ap) ; | |||
| 16238 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,ap,&lower);*/ | |||
| 16239 | if (PyErr_Occurred()) | |||
| 16240 | f2py_success = 0; | |||
| 16241 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16242 | f2py_stop_call_clock(); | |||
| 16243 | #endif | |||
| 16244 | /*end of callfortranroutine*/ | |||
| 16245 | if (f2py_success) { | |||
| 16246 | /*pyobjfrom*/ | |||
| 16247 | /*end of pyobjfrom*/ | |||
| 16248 | CFUNCSMESS("Building return value.\n"); | |||
| 16249 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 16250 | /*closepyobjfrom*/ | |||
| 16251 | /*end of closepyobjfrom*/ | |||
| 16252 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 16253 | /*cleanupfrompyobj*/ | |||
| 16254 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 16255 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 16256 | /* End of cleaning variable ap */ | |||
| 16257 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 16258 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 16259 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 16260 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 16261 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 16262 | /* End of cleaning variable x */ | |||
| 16263 | } /*if (f2py_success) of alpha*/ | |||
| 16264 | /* End of cleaning variable alpha */ | |||
| 16265 | } /*if (f2py_success) of offx*/ | |||
| 16266 | /* End of cleaning variable offx */ | |||
| 16267 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 16268 | } /*if (f2py_success) of incx*/ | |||
| 16269 | /* End of cleaning variable incx */ | |||
| 16270 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 16271 | } /*if (f2py_success) of lower*/ | |||
| 16272 | /* End of cleaning variable lower */ | |||
| 16273 | } /*CHECKSCALAR(n>=0)*/ | |||
| 16274 | } /*if (f2py_success) of n*/ | |||
| 16275 | /* End of cleaning variable n */ | |||
| 16276 | /*end of cleanupfrompyobj*/ | |||
| 16277 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 16278 | /*routdebugfailure*/ | |||
| 16279 | } else { | |||
| 16280 | /*routdebugleave*/ | |||
| 16281 | } | |||
| 16282 | CFUNCSMESS("Freeing memory.\n"); | |||
| 16283 | /*freemem*/ | |||
| 16284 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16285 | f2py_stop_clock(); | |||
| 16286 | #endif | |||
| 16287 | return capi_buildvalue; | |||
| 16288 | } | |||
| 16289 | /******************************** end of zhpr ********************************/ | |||
| 16290 | ||||
| 16291 | /*********************************** sspr2 ***********************************/ | |||
| 16292 | static char doc_f2py_rout__fblas_sspr2[] = "\ | |||
| 16293 | apu = sspr2(n,alpha,x,y,ap,[incx,offx,incy,offy,lower,overwrite_ap])\n\nWrapper for ``sspr2``.\ | |||
| 16294 | \n\nParameters\n----------\n" | |||
| 16295 | "n : input int\n" | |||
| 16296 | "alpha : input float\n" | |||
| 16297 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 16298 | "y : input rank-1 array('f') with bounds (*)\n" | |||
| 16299 | "ap : input rank-1 array('f') with bounds (*)\n" | |||
| 16300 | "\nOther Parameters\n----------------\n" | |||
| 16301 | "incx : input int, optional\n Default: 1\n" | |||
| 16302 | "offx : input int, optional\n Default: 0\n" | |||
| 16303 | "incy : input int, optional\n Default: 1\n" | |||
| 16304 | "offy : input int, optional\n Default: 0\n" | |||
| 16305 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 16306 | "lower : input int, optional\n Default: 0\n" | |||
| 16307 | "\nReturns\n-------\n" | |||
| 16308 | "apu : rank-1 array('f') with bounds (*) and ap storage"; | |||
| 16309 | /* extern void F_FUNC(sspr2,SSPR2)(char*,F_INT*,float*,float*,F_INT*,float*,F_INT*,float* ); */ | |||
| 16310 | static PyObject *f2py_rout__fblas_sspr2(const PyObject *capi_self, | |||
| 16311 | PyObject *capi_args, | |||
| 16312 | PyObject *capi_keywds, | |||
| 16313 | void (*f2py_func)(char*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*,float* )) { | |||
| 16314 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 16315 | volatile int f2py_success = 1; | |||
| 16316 | /*decl*/ | |||
| 16317 | ||||
| 16318 | int n = 0; | |||
| 16319 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 16320 | float alpha = 0; | |||
| 16321 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 16322 | float *x = NULL((void*)0); | |||
| 16323 | npy_intp x_Dims[1] = {-1}; | |||
| 16324 | const int x_Rank = 1; | |||
| 16325 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 16326 | int capi_x_intent = 0; | |||
| 16327 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 16328 | int incx = 0; | |||
| 16329 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 16330 | int offx = 0; | |||
| 16331 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 16332 | float *y = NULL((void*)0); | |||
| 16333 | npy_intp y_Dims[1] = {-1}; | |||
| 16334 | const int y_Rank = 1; | |||
| 16335 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 16336 | int capi_y_intent = 0; | |||
| 16337 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 16338 | int incy = 0; | |||
| 16339 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 16340 | int offy = 0; | |||
| 16341 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 16342 | float *ap = NULL((void*)0); | |||
| 16343 | npy_intp ap_Dims[1] = {-1}; | |||
| 16344 | const int ap_Rank = 1; | |||
| 16345 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 16346 | int capi_ap_intent = 0; | |||
| 16347 | int capi_overwrite_ap = 0; | |||
| 16348 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 16349 | int lower = 0; | |||
| 16350 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 16351 | static char *capi_kwlist[] = {"n","alpha","x","y","ap","incx","offx","incy","offy","lower","overwrite_ap",NULL((void*)0)}; | |||
| 16352 | ||||
| 16353 | /*routdebugenter*/ | |||
| 16354 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16355 | f2py_start_clock(); | |||
| 16356 | #endif | |||
| 16357 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 16358 | "OOOOO|OOOOOi:_fblas.sspr2",\ | |||
| 16359 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&y_capi,&ap_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 16360 | return NULL((void*)0); | |||
| 16361 | /*frompyobj*/ | |||
| 16362 | /* Processing variable n */ | |||
| 16363 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.sspr2() 1st argument (n) can't be converted to int"); | |||
| 16364 | if (f2py_success) { | |||
| 16365 | CHECKSCALAR(n>=0,"n>=0","1st argument n","sspr2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr2:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 16366 | /* Processing variable lower */ | |||
| 16367 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 16368 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.sspr2() 5th keyword (lower) can't be converted to int"); | |||
| 16369 | if (f2py_success) { | |||
| 16370 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","5th keyword lower","sspr2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "5th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16371 | /* Processing variable incx */ | |||
| 16372 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 16373 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.sspr2() 1st keyword (incx) can't be converted to int"); | |||
| 16374 | if (f2py_success) { | |||
| 16375 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","sspr2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr2:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16376 | /* Processing variable incy */ | |||
| 16377 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 16378 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.sspr2() 3rd keyword (incy) can't be converted to int"); | |||
| 16379 | if (f2py_success) { | |||
| 16380 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","3rd keyword incy","sspr2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sspr2:incy=%d", "(""incy>0||incy<0"") failed for " "3rd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16381 | /* Processing variable offx */ | |||
| 16382 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 16383 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.sspr2() 2nd keyword (offx) can't be converted to int"); | |||
| 16384 | if (f2py_success) { | |||
| 16385 | /* Processing variable offy */ | |||
| 16386 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 16387 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.sspr2() 4th keyword (offy) can't be converted to int"); | |||
| 16388 | if (f2py_success) { | |||
| 16389 | /* Processing variable alpha */ | |||
| 16390 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sspr2() 2nd argument (alpha) can't be converted to float"); | |||
| 16391 | if (f2py_success) { | |||
| 16392 | /* Processing variable x */ | |||
| 16393 | ; | |||
| 16394 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 16395 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 16396 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 16397 | if (!PyErr_Occurred()) | |||
| 16398 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.sspr2 to C/Fortran array" ); | |||
| 16399 | } else { | |||
| 16400 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 16401 | ||||
| 16402 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 16403 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 16404 | /* Processing variable y */ | |||
| 16405 | ; | |||
| 16406 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 16407 | capi_y_tmp = array_from_pyobj(NPY_FLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 16408 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 16409 | if (!PyErr_Occurred()) | |||
| 16410 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `y' of _fblas.sspr2 to C/Fortran array" ); | |||
| 16411 | } else { | |||
| 16412 | y = (float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 16413 | ||||
| 16414 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th argument y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th argument y" ); } else { | |||
| 16415 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th argument y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th argument y"); } else { | |||
| 16416 | /* Processing variable ap */ | |||
| 16417 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 16418 | ; | |||
| 16419 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 16420 | capi_ap_tmp = array_from_pyobj(NPY_FLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 16421 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 16422 | if (!PyErr_Occurred()) | |||
| 16423 | PyErr_SetString(_fblas_error,"failed in converting 5th argument `ap' of _fblas.sspr2 to C/Fortran array" ); | |||
| 16424 | } else { | |||
| 16425 | ap = (float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 16426 | ||||
| 16427 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","5th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""5th argument ap" ); } else { | |||
| 16428 | /*end of frompyobj*/ | |||
| 16429 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16430 | f2py_start_call_clock(); | |||
| 16431 | #endif | |||
| 16432 | /*callfortranroutine*/ | |||
| 16433 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,ap) ; | |||
| 16434 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,y,&incy,&offy,ap,&lower);*/ | |||
| 16435 | if (PyErr_Occurred()) | |||
| 16436 | f2py_success = 0; | |||
| 16437 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16438 | f2py_stop_call_clock(); | |||
| 16439 | #endif | |||
| 16440 | /*end of callfortranroutine*/ | |||
| 16441 | if (f2py_success) { | |||
| 16442 | /*pyobjfrom*/ | |||
| 16443 | /*end of pyobjfrom*/ | |||
| 16444 | CFUNCSMESS("Building return value.\n"); | |||
| 16445 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 16446 | /*closepyobjfrom*/ | |||
| 16447 | /*end of closepyobjfrom*/ | |||
| 16448 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 16449 | /*cleanupfrompyobj*/ | |||
| 16450 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 16451 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 16452 | /* End of cleaning variable ap */ | |||
| 16453 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 16454 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 16455 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 16456 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 16457 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 16458 | /* End of cleaning variable y */ | |||
| 16459 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 16460 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 16461 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 16462 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 16463 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 16464 | /* End of cleaning variable x */ | |||
| 16465 | } /*if (f2py_success) of alpha*/ | |||
| 16466 | /* End of cleaning variable alpha */ | |||
| 16467 | } /*if (f2py_success) of offy*/ | |||
| 16468 | /* End of cleaning variable offy */ | |||
| 16469 | } /*if (f2py_success) of offx*/ | |||
| 16470 | /* End of cleaning variable offx */ | |||
| 16471 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 16472 | } /*if (f2py_success) of incy*/ | |||
| 16473 | /* End of cleaning variable incy */ | |||
| 16474 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 16475 | } /*if (f2py_success) of incx*/ | |||
| 16476 | /* End of cleaning variable incx */ | |||
| 16477 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 16478 | } /*if (f2py_success) of lower*/ | |||
| 16479 | /* End of cleaning variable lower */ | |||
| 16480 | } /*CHECKSCALAR(n>=0)*/ | |||
| 16481 | } /*if (f2py_success) of n*/ | |||
| 16482 | /* End of cleaning variable n */ | |||
| 16483 | /*end of cleanupfrompyobj*/ | |||
| 16484 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 16485 | /*routdebugfailure*/ | |||
| 16486 | } else { | |||
| 16487 | /*routdebugleave*/ | |||
| 16488 | } | |||
| 16489 | CFUNCSMESS("Freeing memory.\n"); | |||
| 16490 | /*freemem*/ | |||
| 16491 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16492 | f2py_stop_clock(); | |||
| 16493 | #endif | |||
| 16494 | return capi_buildvalue; | |||
| 16495 | } | |||
| 16496 | /******************************** end of sspr2 ********************************/ | |||
| 16497 | ||||
| 16498 | /*********************************** dspr2 ***********************************/ | |||
| 16499 | static char doc_f2py_rout__fblas_dspr2[] = "\ | |||
| 16500 | apu = dspr2(n,alpha,x,y,ap,[incx,offx,incy,offy,lower,overwrite_ap])\n\nWrapper for ``dspr2``.\ | |||
| 16501 | \n\nParameters\n----------\n" | |||
| 16502 | "n : input int\n" | |||
| 16503 | "alpha : input float\n" | |||
| 16504 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 16505 | "y : input rank-1 array('d') with bounds (*)\n" | |||
| 16506 | "ap : input rank-1 array('d') with bounds (*)\n" | |||
| 16507 | "\nOther Parameters\n----------------\n" | |||
| 16508 | "incx : input int, optional\n Default: 1\n" | |||
| 16509 | "offx : input int, optional\n Default: 0\n" | |||
| 16510 | "incy : input int, optional\n Default: 1\n" | |||
| 16511 | "offy : input int, optional\n Default: 0\n" | |||
| 16512 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 16513 | "lower : input int, optional\n Default: 0\n" | |||
| 16514 | "\nReturns\n-------\n" | |||
| 16515 | "apu : rank-1 array('d') with bounds (*) and ap storage"; | |||
| 16516 | /* extern void F_FUNC(dspr2,DSPR2)(char*,F_INT*,double*,double*,F_INT*,double*,F_INT*,double* ); */ | |||
| 16517 | static PyObject *f2py_rout__fblas_dspr2(const PyObject *capi_self, | |||
| 16518 | PyObject *capi_args, | |||
| 16519 | PyObject *capi_keywds, | |||
| 16520 | void (*f2py_func)(char*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*,double* )) { | |||
| 16521 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 16522 | volatile int f2py_success = 1; | |||
| 16523 | /*decl*/ | |||
| 16524 | ||||
| 16525 | int n = 0; | |||
| 16526 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 16527 | double alpha = 0; | |||
| 16528 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 16529 | double *x = NULL((void*)0); | |||
| 16530 | npy_intp x_Dims[1] = {-1}; | |||
| 16531 | const int x_Rank = 1; | |||
| 16532 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 16533 | int capi_x_intent = 0; | |||
| 16534 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 16535 | int incx = 0; | |||
| 16536 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 16537 | int offx = 0; | |||
| 16538 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 16539 | double *y = NULL((void*)0); | |||
| 16540 | npy_intp y_Dims[1] = {-1}; | |||
| 16541 | const int y_Rank = 1; | |||
| 16542 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 16543 | int capi_y_intent = 0; | |||
| 16544 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 16545 | int incy = 0; | |||
| 16546 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 16547 | int offy = 0; | |||
| 16548 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 16549 | double *ap = NULL((void*)0); | |||
| 16550 | npy_intp ap_Dims[1] = {-1}; | |||
| 16551 | const int ap_Rank = 1; | |||
| 16552 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 16553 | int capi_ap_intent = 0; | |||
| 16554 | int capi_overwrite_ap = 0; | |||
| 16555 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 16556 | int lower = 0; | |||
| 16557 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 16558 | static char *capi_kwlist[] = {"n","alpha","x","y","ap","incx","offx","incy","offy","lower","overwrite_ap",NULL((void*)0)}; | |||
| 16559 | ||||
| 16560 | /*routdebugenter*/ | |||
| 16561 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16562 | f2py_start_clock(); | |||
| 16563 | #endif | |||
| 16564 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 16565 | "OOOOO|OOOOOi:_fblas.dspr2",\ | |||
| 16566 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&y_capi,&ap_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 16567 | return NULL((void*)0); | |||
| 16568 | /*frompyobj*/ | |||
| 16569 | /* Processing variable n */ | |||
| 16570 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dspr2() 1st argument (n) can't be converted to int"); | |||
| 16571 | if (f2py_success) { | |||
| 16572 | CHECKSCALAR(n>=0,"n>=0","1st argument n","dspr2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr2:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 16573 | /* Processing variable lower */ | |||
| 16574 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 16575 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dspr2() 5th keyword (lower) can't be converted to int"); | |||
| 16576 | if (f2py_success) { | |||
| 16577 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","5th keyword lower","dspr2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "5th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16578 | /* Processing variable incx */ | |||
| 16579 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 16580 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dspr2() 1st keyword (incx) can't be converted to int"); | |||
| 16581 | if (f2py_success) { | |||
| 16582 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dspr2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr2:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16583 | /* Processing variable incy */ | |||
| 16584 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 16585 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.dspr2() 3rd keyword (incy) can't be converted to int"); | |||
| 16586 | if (f2py_success) { | |||
| 16587 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","3rd keyword incy","dspr2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dspr2:incy=%d", "(""incy>0||incy<0"") failed for " "3rd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16588 | /* Processing variable offx */ | |||
| 16589 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 16590 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dspr2() 2nd keyword (offx) can't be converted to int"); | |||
| 16591 | if (f2py_success) { | |||
| 16592 | /* Processing variable offy */ | |||
| 16593 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 16594 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.dspr2() 4th keyword (offy) can't be converted to int"); | |||
| 16595 | if (f2py_success) { | |||
| 16596 | /* Processing variable alpha */ | |||
| 16597 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dspr2() 2nd argument (alpha) can't be converted to double"); | |||
| 16598 | if (f2py_success) { | |||
| 16599 | /* Processing variable x */ | |||
| 16600 | ; | |||
| 16601 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 16602 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 16603 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 16604 | if (!PyErr_Occurred()) | |||
| 16605 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dspr2 to C/Fortran array" ); | |||
| 16606 | } else { | |||
| 16607 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 16608 | ||||
| 16609 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 16610 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 16611 | /* Processing variable y */ | |||
| 16612 | ; | |||
| 16613 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 16614 | capi_y_tmp = array_from_pyobj(NPY_DOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 16615 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 16616 | if (!PyErr_Occurred()) | |||
| 16617 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `y' of _fblas.dspr2 to C/Fortran array" ); | |||
| 16618 | } else { | |||
| 16619 | y = (double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 16620 | ||||
| 16621 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th argument y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th argument y" ); } else { | |||
| 16622 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th argument y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th argument y"); } else { | |||
| 16623 | /* Processing variable ap */ | |||
| 16624 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 16625 | ; | |||
| 16626 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 16627 | capi_ap_tmp = array_from_pyobj(NPY_DOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 16628 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 16629 | if (!PyErr_Occurred()) | |||
| 16630 | PyErr_SetString(_fblas_error,"failed in converting 5th argument `ap' of _fblas.dspr2 to C/Fortran array" ); | |||
| 16631 | } else { | |||
| 16632 | ap = (double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 16633 | ||||
| 16634 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","5th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""5th argument ap" ); } else { | |||
| 16635 | /*end of frompyobj*/ | |||
| 16636 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16637 | f2py_start_call_clock(); | |||
| 16638 | #endif | |||
| 16639 | /*callfortranroutine*/ | |||
| 16640 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,ap) ; | |||
| 16641 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,y,&incy,&offy,ap,&lower);*/ | |||
| 16642 | if (PyErr_Occurred()) | |||
| 16643 | f2py_success = 0; | |||
| 16644 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16645 | f2py_stop_call_clock(); | |||
| 16646 | #endif | |||
| 16647 | /*end of callfortranroutine*/ | |||
| 16648 | if (f2py_success) { | |||
| 16649 | /*pyobjfrom*/ | |||
| 16650 | /*end of pyobjfrom*/ | |||
| 16651 | CFUNCSMESS("Building return value.\n"); | |||
| 16652 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 16653 | /*closepyobjfrom*/ | |||
| 16654 | /*end of closepyobjfrom*/ | |||
| 16655 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 16656 | /*cleanupfrompyobj*/ | |||
| 16657 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 16658 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 16659 | /* End of cleaning variable ap */ | |||
| 16660 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 16661 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 16662 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 16663 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 16664 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 16665 | /* End of cleaning variable y */ | |||
| 16666 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 16667 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 16668 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 16669 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 16670 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 16671 | /* End of cleaning variable x */ | |||
| 16672 | } /*if (f2py_success) of alpha*/ | |||
| 16673 | /* End of cleaning variable alpha */ | |||
| 16674 | } /*if (f2py_success) of offy*/ | |||
| 16675 | /* End of cleaning variable offy */ | |||
| 16676 | } /*if (f2py_success) of offx*/ | |||
| 16677 | /* End of cleaning variable offx */ | |||
| 16678 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 16679 | } /*if (f2py_success) of incy*/ | |||
| 16680 | /* End of cleaning variable incy */ | |||
| 16681 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 16682 | } /*if (f2py_success) of incx*/ | |||
| 16683 | /* End of cleaning variable incx */ | |||
| 16684 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 16685 | } /*if (f2py_success) of lower*/ | |||
| 16686 | /* End of cleaning variable lower */ | |||
| 16687 | } /*CHECKSCALAR(n>=0)*/ | |||
| 16688 | } /*if (f2py_success) of n*/ | |||
| 16689 | /* End of cleaning variable n */ | |||
| 16690 | /*end of cleanupfrompyobj*/ | |||
| 16691 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 16692 | /*routdebugfailure*/ | |||
| 16693 | } else { | |||
| 16694 | /*routdebugleave*/ | |||
| 16695 | } | |||
| 16696 | CFUNCSMESS("Freeing memory.\n"); | |||
| 16697 | /*freemem*/ | |||
| 16698 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16699 | f2py_stop_clock(); | |||
| 16700 | #endif | |||
| 16701 | return capi_buildvalue; | |||
| 16702 | } | |||
| 16703 | /******************************** end of dspr2 ********************************/ | |||
| 16704 | ||||
| 16705 | /*********************************** chpr2 ***********************************/ | |||
| 16706 | static char doc_f2py_rout__fblas_chpr2[] = "\ | |||
| 16707 | apu = chpr2(n,alpha,x,y,ap,[incx,offx,incy,offy,lower,overwrite_ap])\n\nWrapper for ``chpr2``.\ | |||
| 16708 | \n\nParameters\n----------\n" | |||
| 16709 | "n : input int\n" | |||
| 16710 | "alpha : input complex\n" | |||
| 16711 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 16712 | "y : input rank-1 array('F') with bounds (*)\n" | |||
| 16713 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 16714 | "\nOther Parameters\n----------------\n" | |||
| 16715 | "incx : input int, optional\n Default: 1\n" | |||
| 16716 | "offx : input int, optional\n Default: 0\n" | |||
| 16717 | "incy : input int, optional\n Default: 1\n" | |||
| 16718 | "offy : input int, optional\n Default: 0\n" | |||
| 16719 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 16720 | "lower : input int, optional\n Default: 0\n" | |||
| 16721 | "\nReturns\n-------\n" | |||
| 16722 | "apu : rank-1 array('F') with bounds (*) and ap storage"; | |||
| 16723 | /* extern void F_FUNC(chpr2,CHPR2)(char*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*,complex_float* ); */ | |||
| 16724 | static PyObject *f2py_rout__fblas_chpr2(const PyObject *capi_self, | |||
| 16725 | PyObject *capi_args, | |||
| 16726 | PyObject *capi_keywds, | |||
| 16727 | void (*f2py_func)(char*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*,complex_float* )) { | |||
| 16728 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 16729 | volatile int f2py_success = 1; | |||
| 16730 | /*decl*/ | |||
| 16731 | ||||
| 16732 | int n = 0; | |||
| 16733 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 16734 | complex_float alpha; | |||
| 16735 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 16736 | complex_float *x = NULL((void*)0); | |||
| 16737 | npy_intp x_Dims[1] = {-1}; | |||
| 16738 | const int x_Rank = 1; | |||
| 16739 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 16740 | int capi_x_intent = 0; | |||
| 16741 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 16742 | int incx = 0; | |||
| 16743 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 16744 | int offx = 0; | |||
| 16745 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 16746 | complex_float *y = NULL((void*)0); | |||
| 16747 | npy_intp y_Dims[1] = {-1}; | |||
| 16748 | const int y_Rank = 1; | |||
| 16749 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 16750 | int capi_y_intent = 0; | |||
| 16751 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 16752 | int incy = 0; | |||
| 16753 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 16754 | int offy = 0; | |||
| 16755 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 16756 | complex_float *ap = NULL((void*)0); | |||
| 16757 | npy_intp ap_Dims[1] = {-1}; | |||
| 16758 | const int ap_Rank = 1; | |||
| 16759 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 16760 | int capi_ap_intent = 0; | |||
| 16761 | int capi_overwrite_ap = 0; | |||
| 16762 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 16763 | int lower = 0; | |||
| 16764 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 16765 | static char *capi_kwlist[] = {"n","alpha","x","y","ap","incx","offx","incy","offy","lower","overwrite_ap",NULL((void*)0)}; | |||
| 16766 | ||||
| 16767 | /*routdebugenter*/ | |||
| 16768 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16769 | f2py_start_clock(); | |||
| 16770 | #endif | |||
| 16771 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 16772 | "OOOOO|OOOOOi:_fblas.chpr2",\ | |||
| 16773 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&y_capi,&ap_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 16774 | return NULL((void*)0); | |||
| 16775 | /*frompyobj*/ | |||
| 16776 | /* Processing variable n */ | |||
| 16777 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.chpr2() 1st argument (n) can't be converted to int"); | |||
| 16778 | if (f2py_success) { | |||
| 16779 | CHECKSCALAR(n>=0,"n>=0","1st argument n","chpr2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr2:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 16780 | /* Processing variable lower */ | |||
| 16781 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 16782 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.chpr2() 5th keyword (lower) can't be converted to int"); | |||
| 16783 | if (f2py_success) { | |||
| 16784 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","5th keyword lower","chpr2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "5th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16785 | /* Processing variable incx */ | |||
| 16786 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 16787 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.chpr2() 1st keyword (incx) can't be converted to int"); | |||
| 16788 | if (f2py_success) { | |||
| 16789 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","chpr2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr2:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16790 | /* Processing variable incy */ | |||
| 16791 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 16792 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.chpr2() 3rd keyword (incy) can't be converted to int"); | |||
| 16793 | if (f2py_success) { | |||
| 16794 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","3rd keyword incy","chpr2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chpr2:incy=%d", "(""incy>0||incy<0"") failed for " "3rd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16795 | /* Processing variable offx */ | |||
| 16796 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 16797 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.chpr2() 2nd keyword (offx) can't be converted to int"); | |||
| 16798 | if (f2py_success) { | |||
| 16799 | /* Processing variable offy */ | |||
| 16800 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 16801 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.chpr2() 4th keyword (offy) can't be converted to int"); | |||
| 16802 | if (f2py_success) { | |||
| 16803 | /* Processing variable alpha */ | |||
| 16804 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.chpr2() 2nd argument (alpha) can't be converted to complex_float"); | |||
| 16805 | if (f2py_success) { | |||
| 16806 | /* Processing variable x */ | |||
| 16807 | ; | |||
| 16808 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 16809 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 16810 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 16811 | if (!PyErr_Occurred()) | |||
| 16812 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.chpr2 to C/Fortran array" ); | |||
| 16813 | } else { | |||
| 16814 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 16815 | ||||
| 16816 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 16817 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 16818 | /* Processing variable y */ | |||
| 16819 | ; | |||
| 16820 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 16821 | capi_y_tmp = array_from_pyobj(NPY_CFLOAT,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 16822 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 16823 | if (!PyErr_Occurred()) | |||
| 16824 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `y' of _fblas.chpr2 to C/Fortran array" ); | |||
| 16825 | } else { | |||
| 16826 | y = (complex_float *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 16827 | ||||
| 16828 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th argument y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th argument y" ); } else { | |||
| 16829 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th argument y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th argument y"); } else { | |||
| 16830 | /* Processing variable ap */ | |||
| 16831 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 16832 | ; | |||
| 16833 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 16834 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 16835 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 16836 | if (!PyErr_Occurred()) | |||
| 16837 | PyErr_SetString(_fblas_error,"failed in converting 5th argument `ap' of _fblas.chpr2 to C/Fortran array" ); | |||
| 16838 | } else { | |||
| 16839 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 16840 | ||||
| 16841 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","5th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""5th argument ap" ); } else { | |||
| 16842 | /*end of frompyobj*/ | |||
| 16843 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16844 | f2py_start_call_clock(); | |||
| 16845 | #endif | |||
| 16846 | /*callfortranroutine*/ | |||
| 16847 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,ap) ; | |||
| 16848 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,y,&incy,&offy,ap,&lower);*/ | |||
| 16849 | if (PyErr_Occurred()) | |||
| 16850 | f2py_success = 0; | |||
| 16851 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16852 | f2py_stop_call_clock(); | |||
| 16853 | #endif | |||
| 16854 | /*end of callfortranroutine*/ | |||
| 16855 | if (f2py_success) { | |||
| 16856 | /*pyobjfrom*/ | |||
| 16857 | /*end of pyobjfrom*/ | |||
| 16858 | CFUNCSMESS("Building return value.\n"); | |||
| 16859 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 16860 | /*closepyobjfrom*/ | |||
| 16861 | /*end of closepyobjfrom*/ | |||
| 16862 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 16863 | /*cleanupfrompyobj*/ | |||
| 16864 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 16865 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 16866 | /* End of cleaning variable ap */ | |||
| 16867 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 16868 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 16869 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 16870 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 16871 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 16872 | /* End of cleaning variable y */ | |||
| 16873 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 16874 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 16875 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 16876 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 16877 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 16878 | /* End of cleaning variable x */ | |||
| 16879 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 16880 | /* End of cleaning variable alpha */ | |||
| 16881 | } /*if (f2py_success) of offy*/ | |||
| 16882 | /* End of cleaning variable offy */ | |||
| 16883 | } /*if (f2py_success) of offx*/ | |||
| 16884 | /* End of cleaning variable offx */ | |||
| 16885 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 16886 | } /*if (f2py_success) of incy*/ | |||
| 16887 | /* End of cleaning variable incy */ | |||
| 16888 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 16889 | } /*if (f2py_success) of incx*/ | |||
| 16890 | /* End of cleaning variable incx */ | |||
| 16891 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 16892 | } /*if (f2py_success) of lower*/ | |||
| 16893 | /* End of cleaning variable lower */ | |||
| 16894 | } /*CHECKSCALAR(n>=0)*/ | |||
| 16895 | } /*if (f2py_success) of n*/ | |||
| 16896 | /* End of cleaning variable n */ | |||
| 16897 | /*end of cleanupfrompyobj*/ | |||
| 16898 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 16899 | /*routdebugfailure*/ | |||
| 16900 | } else { | |||
| 16901 | /*routdebugleave*/ | |||
| 16902 | } | |||
| 16903 | CFUNCSMESS("Freeing memory.\n"); | |||
| 16904 | /*freemem*/ | |||
| 16905 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16906 | f2py_stop_clock(); | |||
| 16907 | #endif | |||
| 16908 | return capi_buildvalue; | |||
| 16909 | } | |||
| 16910 | /******************************** end of chpr2 ********************************/ | |||
| 16911 | ||||
| 16912 | /*********************************** zhpr2 ***********************************/ | |||
| 16913 | static char doc_f2py_rout__fblas_zhpr2[] = "\ | |||
| 16914 | apu = zhpr2(n,alpha,x,y,ap,[incx,offx,incy,offy,lower,overwrite_ap])\n\nWrapper for ``zhpr2``.\ | |||
| 16915 | \n\nParameters\n----------\n" | |||
| 16916 | "n : input int\n" | |||
| 16917 | "alpha : input complex\n" | |||
| 16918 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 16919 | "y : input rank-1 array('D') with bounds (*)\n" | |||
| 16920 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 16921 | "\nOther Parameters\n----------------\n" | |||
| 16922 | "incx : input int, optional\n Default: 1\n" | |||
| 16923 | "offx : input int, optional\n Default: 0\n" | |||
| 16924 | "incy : input int, optional\n Default: 1\n" | |||
| 16925 | "offy : input int, optional\n Default: 0\n" | |||
| 16926 | "overwrite_ap : input int, optional\n Default: 0\n" | |||
| 16927 | "lower : input int, optional\n Default: 0\n" | |||
| 16928 | "\nReturns\n-------\n" | |||
| 16929 | "apu : rank-1 array('D') with bounds (*) and ap storage"; | |||
| 16930 | /* extern void F_FUNC(zhpr2,ZHPR2)(char*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*,complex_double* ); */ | |||
| 16931 | static PyObject *f2py_rout__fblas_zhpr2(const PyObject *capi_self, | |||
| 16932 | PyObject *capi_args, | |||
| 16933 | PyObject *capi_keywds, | |||
| 16934 | void (*f2py_func)(char*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*,complex_double* )) { | |||
| 16935 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 16936 | volatile int f2py_success = 1; | |||
| 16937 | /*decl*/ | |||
| 16938 | ||||
| 16939 | int n = 0; | |||
| 16940 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 16941 | complex_double alpha; | |||
| 16942 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 16943 | complex_double *x = NULL((void*)0); | |||
| 16944 | npy_intp x_Dims[1] = {-1}; | |||
| 16945 | const int x_Rank = 1; | |||
| 16946 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 16947 | int capi_x_intent = 0; | |||
| 16948 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 16949 | int incx = 0; | |||
| 16950 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 16951 | int offx = 0; | |||
| 16952 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 16953 | complex_double *y = NULL((void*)0); | |||
| 16954 | npy_intp y_Dims[1] = {-1}; | |||
| 16955 | const int y_Rank = 1; | |||
| 16956 | PyArrayObject *capi_y_tmp = NULL((void*)0); | |||
| 16957 | int capi_y_intent = 0; | |||
| 16958 | PyObject *y_capi = Py_None(&_Py_NoneStruct); | |||
| 16959 | int incy = 0; | |||
| 16960 | PyObject *incy_capi = Py_None(&_Py_NoneStruct); | |||
| 16961 | int offy = 0; | |||
| 16962 | PyObject *offy_capi = Py_None(&_Py_NoneStruct); | |||
| 16963 | complex_double *ap = NULL((void*)0); | |||
| 16964 | npy_intp ap_Dims[1] = {-1}; | |||
| 16965 | const int ap_Rank = 1; | |||
| 16966 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 16967 | int capi_ap_intent = 0; | |||
| 16968 | int capi_overwrite_ap = 0; | |||
| 16969 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 16970 | int lower = 0; | |||
| 16971 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 16972 | static char *capi_kwlist[] = {"n","alpha","x","y","ap","incx","offx","incy","offy","lower","overwrite_ap",NULL((void*)0)}; | |||
| 16973 | ||||
| 16974 | /*routdebugenter*/ | |||
| 16975 | #ifdef F2PY_REPORT_ATEXIT | |||
| 16976 | f2py_start_clock(); | |||
| 16977 | #endif | |||
| 16978 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 16979 | "OOOOO|OOOOOi:_fblas.zhpr2",\ | |||
| 16980 | capi_kwlist,&n_capi,&alpha_capi,&x_capi,&y_capi,&ap_capi,&incx_capi,&offx_capi,&incy_capi,&offy_capi,&lower_capi,&capi_overwrite_ap)) | |||
| 16981 | return NULL((void*)0); | |||
| 16982 | /*frompyobj*/ | |||
| 16983 | /* Processing variable n */ | |||
| 16984 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.zhpr2() 1st argument (n) can't be converted to int"); | |||
| 16985 | if (f2py_success) { | |||
| 16986 | CHECKSCALAR(n>=0,"n>=0","1st argument n","zhpr2:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr2:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 16987 | /* Processing variable lower */ | |||
| 16988 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 16989 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zhpr2() 5th keyword (lower) can't be converted to int"); | |||
| 16990 | if (f2py_success) { | |||
| 16991 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","5th keyword lower","zhpr2:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr2:lower=%d", "(""lower == 0 || lower == 1"") failed for " "5th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16992 | /* Processing variable incx */ | |||
| 16993 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 16994 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.zhpr2() 1st keyword (incx) can't be converted to int"); | |||
| 16995 | if (f2py_success) { | |||
| 16996 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","zhpr2:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr2:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 16997 | /* Processing variable incy */ | |||
| 16998 | if (incy_capi == Py_None(&_Py_NoneStruct)) incy = 1; else | |||
| 16999 | f2py_success = int_from_pyobj(&incy,incy_capi,"_fblas.zhpr2() 3rd keyword (incy) can't be converted to int"); | |||
| 17000 | if (f2py_success) { | |||
| 17001 | CHECKSCALAR(incy>0||incy<0,"incy>0||incy<0","3rd keyword incy","zhpr2:incy=%d",incy)if (!(incy>0||incy<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhpr2:incy=%d", "(""incy>0||incy<0"") failed for " "3rd keyword incy", incy); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17002 | /* Processing variable offx */ | |||
| 17003 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 17004 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.zhpr2() 2nd keyword (offx) can't be converted to int"); | |||
| 17005 | if (f2py_success) { | |||
| 17006 | /* Processing variable offy */ | |||
| 17007 | if (offy_capi == Py_None(&_Py_NoneStruct)) offy = 0; else | |||
| 17008 | f2py_success = int_from_pyobj(&offy,offy_capi,"_fblas.zhpr2() 4th keyword (offy) can't be converted to int"); | |||
| 17009 | if (f2py_success) { | |||
| 17010 | /* Processing variable alpha */ | |||
| 17011 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zhpr2() 2nd argument (alpha) can't be converted to complex_double"); | |||
| 17012 | if (f2py_success) { | |||
| 17013 | /* Processing variable x */ | |||
| 17014 | ; | |||
| 17015 | capi_x_intent |= F2PY_INTENT_IN1; | |||
| 17016 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 17017 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 17018 | if (!PyErr_Occurred()) | |||
| 17019 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.zhpr2 to C/Fortran array" ); | |||
| 17020 | } else { | |||
| 17021 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 17022 | ||||
| 17023 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 17024 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 17025 | /* Processing variable y */ | |||
| 17026 | ; | |||
| 17027 | capi_y_intent |= F2PY_INTENT_IN1; | |||
| 17028 | capi_y_tmp = array_from_pyobj(NPY_CDOUBLE,y_Dims,y_Rank,capi_y_intent,y_capi); | |||
| 17029 | if (capi_y_tmp == NULL((void*)0)) { | |||
| 17030 | if (!PyErr_Occurred()) | |||
| 17031 | PyErr_SetString(_fblas_error,"failed in converting 4th argument `y' of _fblas.zhpr2 to C/Fortran array" ); | |||
| 17032 | } else { | |||
| 17033 | y = (complex_double *)(PyArray_DATA(capi_y_tmp)((void *)((PyArrayObject_fields *)(capi_y_tmp))->data)); | |||
| 17034 | ||||
| 17035 | CHECKARRAY(len(y)>offy+(n-1)*abs(incy),"len(y)>offy+(n-1)*abs(incy)","4th argument y")if (!(y_Dims[0]>offy+(n-1)*abs(incy))) { PyErr_SetString(_fblas_error ,"(""len(y)>offy+(n-1)*abs(incy)"") failed for ""4th argument y" ); } else { | |||
| 17036 | CHECKARRAY(offy>=0 && offy<len(y),"offy>=0 && offy<len(y)","4th argument y")if (!(offy>=0 && offy<y_Dims[0])) { PyErr_SetString (_fblas_error,"(""offy>=0 && offy<len(y)"") failed for " "4th argument y"); } else { | |||
| 17037 | /* Processing variable ap */ | |||
| 17038 | capi_ap_intent |= (capi_overwrite_ap?0:F2PY_INTENT_COPY32); | |||
| 17039 | ; | |||
| 17040 | capi_ap_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 17041 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 17042 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 17043 | if (!PyErr_Occurred()) | |||
| 17044 | PyErr_SetString(_fblas_error,"failed in converting 5th argument `ap' of _fblas.zhpr2 to C/Fortran array" ); | |||
| 17045 | } else { | |||
| 17046 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 17047 | ||||
| 17048 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","5th argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""5th argument ap" ); } else { | |||
| 17049 | /*end of frompyobj*/ | |||
| 17050 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17051 | f2py_start_call_clock(); | |||
| 17052 | #endif | |||
| 17053 | /*callfortranroutine*/ | |||
| 17054 | (*f2py_func)((lower?"L":"U"),&n,&alpha,x+offx,&incx,y+offy,&incy,ap) ; | |||
| 17055 | /*(*f2py_func)(&n,&alpha,x,&incx,&offx,y,&incy,&offy,ap,&lower);*/ | |||
| 17056 | if (PyErr_Occurred()) | |||
| 17057 | f2py_success = 0; | |||
| 17058 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17059 | f2py_stop_call_clock(); | |||
| 17060 | #endif | |||
| 17061 | /*end of callfortranroutine*/ | |||
| 17062 | if (f2py_success) { | |||
| 17063 | /*pyobjfrom*/ | |||
| 17064 | /*end of pyobjfrom*/ | |||
| 17065 | CFUNCSMESS("Building return value.\n"); | |||
| 17066 | capi_buildvalue = Py_BuildValue("N",capi_ap_tmp); | |||
| 17067 | /*closepyobjfrom*/ | |||
| 17068 | /*end of closepyobjfrom*/ | |||
| 17069 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 17070 | /*cleanupfrompyobj*/ | |||
| 17071 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 17072 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 17073 | /* End of cleaning variable ap */ | |||
| 17074 | } /*CHECKARRAY(offy>=0 && offy<len(y))*/ | |||
| 17075 | } /*CHECKARRAY(len(y)>offy+(n-1)*abs(incy))*/ | |||
| 17076 | if((PyObject *)capi_y_tmp!=y_capi) { | |||
| 17077 | Py_XDECREF(capi_y_tmp)_Py_XDECREF(((PyObject*)(capi_y_tmp))); } | |||
| 17078 | } /*if (capi_y_tmp == NULL) ... else of y*/ | |||
| 17079 | /* End of cleaning variable y */ | |||
| 17080 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 17081 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 17082 | if((PyObject *)capi_x_tmp!=x_capi) { | |||
| 17083 | Py_XDECREF(capi_x_tmp)_Py_XDECREF(((PyObject*)(capi_x_tmp))); } | |||
| 17084 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 17085 | /* End of cleaning variable x */ | |||
| 17086 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 17087 | /* End of cleaning variable alpha */ | |||
| 17088 | } /*if (f2py_success) of offy*/ | |||
| 17089 | /* End of cleaning variable offy */ | |||
| 17090 | } /*if (f2py_success) of offx*/ | |||
| 17091 | /* End of cleaning variable offx */ | |||
| 17092 | } /*CHECKSCALAR(incy>0||incy<0)*/ | |||
| 17093 | } /*if (f2py_success) of incy*/ | |||
| 17094 | /* End of cleaning variable incy */ | |||
| 17095 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 17096 | } /*if (f2py_success) of incx*/ | |||
| 17097 | /* End of cleaning variable incx */ | |||
| 17098 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 17099 | } /*if (f2py_success) of lower*/ | |||
| 17100 | /* End of cleaning variable lower */ | |||
| 17101 | } /*CHECKSCALAR(n>=0)*/ | |||
| 17102 | } /*if (f2py_success) of n*/ | |||
| 17103 | /* End of cleaning variable n */ | |||
| 17104 | /*end of cleanupfrompyobj*/ | |||
| 17105 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 17106 | /*routdebugfailure*/ | |||
| 17107 | } else { | |||
| 17108 | /*routdebugleave*/ | |||
| 17109 | } | |||
| 17110 | CFUNCSMESS("Freeing memory.\n"); | |||
| 17111 | /*freemem*/ | |||
| 17112 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17113 | f2py_stop_clock(); | |||
| 17114 | #endif | |||
| 17115 | return capi_buildvalue; | |||
| 17116 | } | |||
| 17117 | /******************************** end of zhpr2 ********************************/ | |||
| 17118 | ||||
| 17119 | /*********************************** stbsv ***********************************/ | |||
| 17120 | static char doc_f2py_rout__fblas_stbsv[] = "\ | |||
| 17121 | xout = stbsv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``stbsv``.\ | |||
| 17122 | \n\nParameters\n----------\n" | |||
| 17123 | "k : input int\n" | |||
| 17124 | "a : input rank-2 array('f') with bounds (lda,n)\n" | |||
| 17125 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 17126 | "\nOther Parameters\n----------------\n" | |||
| 17127 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 17128 | "incx : input int, optional\n Default: 1\n" | |||
| 17129 | "offx : input int, optional\n Default: 0\n" | |||
| 17130 | "lower : input int, optional\n Default: 0\n" | |||
| 17131 | "trans : input int, optional\n Default: 0\n" | |||
| 17132 | "diag : input int, optional\n Default: 0\n" | |||
| 17133 | "\nReturns\n-------\n" | |||
| 17134 | "xout : rank-1 array('f') with bounds (*) and x storage"; | |||
| 17135 | /* extern void F_FUNC(stbsv,STBSV)(char*,char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 17136 | static PyObject *f2py_rout__fblas_stbsv(const PyObject *capi_self, | |||
| 17137 | PyObject *capi_args, | |||
| 17138 | PyObject *capi_keywds, | |||
| 17139 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 17140 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 17141 | volatile int f2py_success = 1; | |||
| 17142 | /*decl*/ | |||
| 17143 | ||||
| 17144 | int n = 0; | |||
| 17145 | int k = 0; | |||
| 17146 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 17147 | float *a = NULL((void*)0); | |||
| 17148 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 17149 | const int a_Rank = 2; | |||
| 17150 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 17151 | int capi_a_intent = 0; | |||
| 17152 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 17153 | int lda = 0; | |||
| 17154 | float *x = NULL((void*)0); | |||
| 17155 | npy_intp x_Dims[1] = {-1}; | |||
| 17156 | const int x_Rank = 1; | |||
| 17157 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 17158 | int capi_x_intent = 0; | |||
| 17159 | int capi_overwrite_x = 0; | |||
| 17160 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 17161 | int incx = 0; | |||
| 17162 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 17163 | int offx = 0; | |||
| 17164 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 17165 | int lower = 0; | |||
| 17166 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 17167 | int trans = 0; | |||
| 17168 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 17169 | int diag = 0; | |||
| 17170 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 17171 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 17172 | ||||
| 17173 | /*routdebugenter*/ | |||
| 17174 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17175 | f2py_start_clock(); | |||
| 17176 | #endif | |||
| 17177 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 17178 | "OOO|OOOOOi:_fblas.stbsv",\ | |||
| 17179 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 17180 | return NULL((void*)0); | |||
| 17181 | /*frompyobj*/ | |||
| 17182 | /* Processing variable lower */ | |||
| 17183 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 17184 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.stbsv() 3rd keyword (lower) can't be converted to int"); | |||
| 17185 | if (f2py_success) { | |||
| 17186 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","stbsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17187 | /* Processing variable trans */ | |||
| 17188 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 17189 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.stbsv() 4th keyword (trans) can't be converted to int"); | |||
| 17190 | if (f2py_success) { | |||
| 17191 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","stbsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""stbsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 17192 | /* Processing variable diag */ | |||
| 17193 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 17194 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.stbsv() 5th keyword (diag) can't be converted to int"); | |||
| 17195 | if (f2py_success) { | |||
| 17196 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","stbsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17197 | /* Processing variable incx */ | |||
| 17198 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 17199 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.stbsv() 1st keyword (incx) can't be converted to int"); | |||
| 17200 | if (f2py_success) { | |||
| 17201 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","stbsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17202 | /* Processing variable offx */ | |||
| 17203 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 17204 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.stbsv() 2nd keyword (offx) can't be converted to int"); | |||
| 17205 | if (f2py_success) { | |||
| 17206 | /* Processing variable a */ | |||
| 17207 | ; | |||
| 17208 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 17209 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 17210 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 17211 | if (!PyErr_Occurred()) | |||
| 17212 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.stbsv to C/Fortran array" ); | |||
| 17213 | } else { | |||
| 17214 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 17215 | ||||
| 17216 | /* Processing variable n */ | |||
| 17217 | n = shape(a,1)a_Dims[1]; | |||
| 17218 | CHECKSCALAR(n>=0,"n>=0","hidden n","stbsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 17219 | /* Processing variable lda */ | |||
| 17220 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 17221 | /* Processing variable k */ | |||
| 17222 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.stbsv() 1st argument (k) can't be converted to int"); | |||
| 17223 | if (f2py_success) { | |||
| 17224 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","stbsv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbsv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 17225 | /* Processing variable x */ | |||
| 17226 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 17227 | ; | |||
| 17228 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 17229 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 17230 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 17231 | if (!PyErr_Occurred()) | |||
| 17232 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.stbsv to C/Fortran array" ); | |||
| 17233 | } else { | |||
| 17234 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 17235 | ||||
| 17236 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 17237 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 17238 | /*end of frompyobj*/ | |||
| 17239 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17240 | f2py_start_call_clock(); | |||
| 17241 | #endif | |||
| 17242 | /*callfortranroutine*/ | |||
| 17243 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 17244 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 17245 | if (PyErr_Occurred()) | |||
| 17246 | f2py_success = 0; | |||
| 17247 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17248 | f2py_stop_call_clock(); | |||
| 17249 | #endif | |||
| 17250 | /*end of callfortranroutine*/ | |||
| 17251 | if (f2py_success) { | |||
| 17252 | /*pyobjfrom*/ | |||
| 17253 | /*end of pyobjfrom*/ | |||
| 17254 | CFUNCSMESS("Building return value.\n"); | |||
| 17255 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 17256 | /*closepyobjfrom*/ | |||
| 17257 | /*end of closepyobjfrom*/ | |||
| 17258 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 17259 | /*cleanupfrompyobj*/ | |||
| 17260 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 17261 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 17262 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 17263 | /* End of cleaning variable x */ | |||
| 17264 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 17265 | } /*if (f2py_success) of k*/ | |||
| 17266 | /* End of cleaning variable k */ | |||
| 17267 | /* End of cleaning variable lda */ | |||
| 17268 | } /*CHECKSCALAR(n>=0)*/ | |||
| 17269 | /* End of cleaning variable n */ | |||
| 17270 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 17271 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 17272 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 17273 | /* End of cleaning variable a */ | |||
| 17274 | } /*if (f2py_success) of offx*/ | |||
| 17275 | /* End of cleaning variable offx */ | |||
| 17276 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 17277 | } /*if (f2py_success) of incx*/ | |||
| 17278 | /* End of cleaning variable incx */ | |||
| 17279 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 17280 | } /*if (f2py_success) of diag*/ | |||
| 17281 | /* End of cleaning variable diag */ | |||
| 17282 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 17283 | } /*if (f2py_success) of trans*/ | |||
| 17284 | /* End of cleaning variable trans */ | |||
| 17285 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 17286 | } /*if (f2py_success) of lower*/ | |||
| 17287 | /* End of cleaning variable lower */ | |||
| 17288 | /*end of cleanupfrompyobj*/ | |||
| 17289 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 17290 | /*routdebugfailure*/ | |||
| 17291 | } else { | |||
| 17292 | /*routdebugleave*/ | |||
| 17293 | } | |||
| 17294 | CFUNCSMESS("Freeing memory.\n"); | |||
| 17295 | /*freemem*/ | |||
| 17296 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17297 | f2py_stop_clock(); | |||
| 17298 | #endif | |||
| 17299 | return capi_buildvalue; | |||
| 17300 | } | |||
| 17301 | /******************************** end of stbsv ********************************/ | |||
| 17302 | ||||
| 17303 | /*********************************** dtbsv ***********************************/ | |||
| 17304 | static char doc_f2py_rout__fblas_dtbsv[] = "\ | |||
| 17305 | xout = dtbsv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``dtbsv``.\ | |||
| 17306 | \n\nParameters\n----------\n" | |||
| 17307 | "k : input int\n" | |||
| 17308 | "a : input rank-2 array('d') with bounds (lda,n)\n" | |||
| 17309 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 17310 | "\nOther Parameters\n----------------\n" | |||
| 17311 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 17312 | "incx : input int, optional\n Default: 1\n" | |||
| 17313 | "offx : input int, optional\n Default: 0\n" | |||
| 17314 | "lower : input int, optional\n Default: 0\n" | |||
| 17315 | "trans : input int, optional\n Default: 0\n" | |||
| 17316 | "diag : input int, optional\n Default: 0\n" | |||
| 17317 | "\nReturns\n-------\n" | |||
| 17318 | "xout : rank-1 array('d') with bounds (*) and x storage"; | |||
| 17319 | /* extern void F_FUNC(dtbsv,DTBSV)(char*,char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 17320 | static PyObject *f2py_rout__fblas_dtbsv(const PyObject *capi_self, | |||
| 17321 | PyObject *capi_args, | |||
| 17322 | PyObject *capi_keywds, | |||
| 17323 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 17324 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 17325 | volatile int f2py_success = 1; | |||
| 17326 | /*decl*/ | |||
| 17327 | ||||
| 17328 | int n = 0; | |||
| 17329 | int k = 0; | |||
| 17330 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 17331 | double *a = NULL((void*)0); | |||
| 17332 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 17333 | const int a_Rank = 2; | |||
| 17334 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 17335 | int capi_a_intent = 0; | |||
| 17336 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 17337 | int lda = 0; | |||
| 17338 | double *x = NULL((void*)0); | |||
| 17339 | npy_intp x_Dims[1] = {-1}; | |||
| 17340 | const int x_Rank = 1; | |||
| 17341 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 17342 | int capi_x_intent = 0; | |||
| 17343 | int capi_overwrite_x = 0; | |||
| 17344 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 17345 | int incx = 0; | |||
| 17346 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 17347 | int offx = 0; | |||
| 17348 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 17349 | int lower = 0; | |||
| 17350 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 17351 | int trans = 0; | |||
| 17352 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 17353 | int diag = 0; | |||
| 17354 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 17355 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 17356 | ||||
| 17357 | /*routdebugenter*/ | |||
| 17358 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17359 | f2py_start_clock(); | |||
| 17360 | #endif | |||
| 17361 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 17362 | "OOO|OOOOOi:_fblas.dtbsv",\ | |||
| 17363 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 17364 | return NULL((void*)0); | |||
| 17365 | /*frompyobj*/ | |||
| 17366 | /* Processing variable lower */ | |||
| 17367 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 17368 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtbsv() 3rd keyword (lower) can't be converted to int"); | |||
| 17369 | if (f2py_success) { | |||
| 17370 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","dtbsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17371 | /* Processing variable trans */ | |||
| 17372 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 17373 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dtbsv() 4th keyword (trans) can't be converted to int"); | |||
| 17374 | if (f2py_success) { | |||
| 17375 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","dtbsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtbsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 17376 | /* Processing variable diag */ | |||
| 17377 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 17378 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtbsv() 5th keyword (diag) can't be converted to int"); | |||
| 17379 | if (f2py_success) { | |||
| 17380 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","dtbsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17381 | /* Processing variable incx */ | |||
| 17382 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 17383 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dtbsv() 1st keyword (incx) can't be converted to int"); | |||
| 17384 | if (f2py_success) { | |||
| 17385 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dtbsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17386 | /* Processing variable offx */ | |||
| 17387 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 17388 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dtbsv() 2nd keyword (offx) can't be converted to int"); | |||
| 17389 | if (f2py_success) { | |||
| 17390 | /* Processing variable a */ | |||
| 17391 | ; | |||
| 17392 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 17393 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 17394 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 17395 | if (!PyErr_Occurred()) | |||
| 17396 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dtbsv to C/Fortran array" ); | |||
| 17397 | } else { | |||
| 17398 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 17399 | ||||
| 17400 | /* Processing variable n */ | |||
| 17401 | n = shape(a,1)a_Dims[1]; | |||
| 17402 | CHECKSCALAR(n>=0,"n>=0","hidden n","dtbsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 17403 | /* Processing variable lda */ | |||
| 17404 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 17405 | /* Processing variable k */ | |||
| 17406 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.dtbsv() 1st argument (k) can't be converted to int"); | |||
| 17407 | if (f2py_success) { | |||
| 17408 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","dtbsv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbsv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 17409 | /* Processing variable x */ | |||
| 17410 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 17411 | ; | |||
| 17412 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 17413 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 17414 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 17415 | if (!PyErr_Occurred()) | |||
| 17416 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dtbsv to C/Fortran array" ); | |||
| 17417 | } else { | |||
| 17418 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 17419 | ||||
| 17420 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 17421 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 17422 | /*end of frompyobj*/ | |||
| 17423 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17424 | f2py_start_call_clock(); | |||
| 17425 | #endif | |||
| 17426 | /*callfortranroutine*/ | |||
| 17427 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 17428 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 17429 | if (PyErr_Occurred()) | |||
| 17430 | f2py_success = 0; | |||
| 17431 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17432 | f2py_stop_call_clock(); | |||
| 17433 | #endif | |||
| 17434 | /*end of callfortranroutine*/ | |||
| 17435 | if (f2py_success) { | |||
| 17436 | /*pyobjfrom*/ | |||
| 17437 | /*end of pyobjfrom*/ | |||
| 17438 | CFUNCSMESS("Building return value.\n"); | |||
| 17439 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 17440 | /*closepyobjfrom*/ | |||
| 17441 | /*end of closepyobjfrom*/ | |||
| 17442 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 17443 | /*cleanupfrompyobj*/ | |||
| 17444 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 17445 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 17446 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 17447 | /* End of cleaning variable x */ | |||
| 17448 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 17449 | } /*if (f2py_success) of k*/ | |||
| 17450 | /* End of cleaning variable k */ | |||
| 17451 | /* End of cleaning variable lda */ | |||
| 17452 | } /*CHECKSCALAR(n>=0)*/ | |||
| 17453 | /* End of cleaning variable n */ | |||
| 17454 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 17455 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 17456 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 17457 | /* End of cleaning variable a */ | |||
| 17458 | } /*if (f2py_success) of offx*/ | |||
| 17459 | /* End of cleaning variable offx */ | |||
| 17460 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 17461 | } /*if (f2py_success) of incx*/ | |||
| 17462 | /* End of cleaning variable incx */ | |||
| 17463 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 17464 | } /*if (f2py_success) of diag*/ | |||
| 17465 | /* End of cleaning variable diag */ | |||
| 17466 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 17467 | } /*if (f2py_success) of trans*/ | |||
| 17468 | /* End of cleaning variable trans */ | |||
| 17469 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 17470 | } /*if (f2py_success) of lower*/ | |||
| 17471 | /* End of cleaning variable lower */ | |||
| 17472 | /*end of cleanupfrompyobj*/ | |||
| 17473 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 17474 | /*routdebugfailure*/ | |||
| 17475 | } else { | |||
| 17476 | /*routdebugleave*/ | |||
| 17477 | } | |||
| 17478 | CFUNCSMESS("Freeing memory.\n"); | |||
| 17479 | /*freemem*/ | |||
| 17480 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17481 | f2py_stop_clock(); | |||
| 17482 | #endif | |||
| 17483 | return capi_buildvalue; | |||
| 17484 | } | |||
| 17485 | /******************************** end of dtbsv ********************************/ | |||
| 17486 | ||||
| 17487 | /*********************************** ctbsv ***********************************/ | |||
| 17488 | static char doc_f2py_rout__fblas_ctbsv[] = "\ | |||
| 17489 | xout = ctbsv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ctbsv``.\ | |||
| 17490 | \n\nParameters\n----------\n" | |||
| 17491 | "k : input int\n" | |||
| 17492 | "a : input rank-2 array('F') with bounds (lda,n)\n" | |||
| 17493 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 17494 | "\nOther Parameters\n----------------\n" | |||
| 17495 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 17496 | "incx : input int, optional\n Default: 1\n" | |||
| 17497 | "offx : input int, optional\n Default: 0\n" | |||
| 17498 | "lower : input int, optional\n Default: 0\n" | |||
| 17499 | "trans : input int, optional\n Default: 0\n" | |||
| 17500 | "diag : input int, optional\n Default: 0\n" | |||
| 17501 | "\nReturns\n-------\n" | |||
| 17502 | "xout : rank-1 array('F') with bounds (*) and x storage"; | |||
| 17503 | /* extern void F_FUNC(ctbsv,CTBSV)(char*,char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 17504 | static PyObject *f2py_rout__fblas_ctbsv(const PyObject *capi_self, | |||
| 17505 | PyObject *capi_args, | |||
| 17506 | PyObject *capi_keywds, | |||
| 17507 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 17508 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 17509 | volatile int f2py_success = 1; | |||
| 17510 | /*decl*/ | |||
| 17511 | ||||
| 17512 | int n = 0; | |||
| 17513 | int k = 0; | |||
| 17514 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 17515 | complex_float *a = NULL((void*)0); | |||
| 17516 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 17517 | const int a_Rank = 2; | |||
| 17518 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 17519 | int capi_a_intent = 0; | |||
| 17520 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 17521 | int lda = 0; | |||
| 17522 | complex_float *x = NULL((void*)0); | |||
| 17523 | npy_intp x_Dims[1] = {-1}; | |||
| 17524 | const int x_Rank = 1; | |||
| 17525 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 17526 | int capi_x_intent = 0; | |||
| 17527 | int capi_overwrite_x = 0; | |||
| 17528 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 17529 | int incx = 0; | |||
| 17530 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 17531 | int offx = 0; | |||
| 17532 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 17533 | int lower = 0; | |||
| 17534 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 17535 | int trans = 0; | |||
| 17536 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 17537 | int diag = 0; | |||
| 17538 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 17539 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 17540 | ||||
| 17541 | /*routdebugenter*/ | |||
| 17542 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17543 | f2py_start_clock(); | |||
| 17544 | #endif | |||
| 17545 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 17546 | "OOO|OOOOOi:_fblas.ctbsv",\ | |||
| 17547 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 17548 | return NULL((void*)0); | |||
| 17549 | /*frompyobj*/ | |||
| 17550 | /* Processing variable lower */ | |||
| 17551 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 17552 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctbsv() 3rd keyword (lower) can't be converted to int"); | |||
| 17553 | if (f2py_success) { | |||
| 17554 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ctbsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17555 | /* Processing variable trans */ | |||
| 17556 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 17557 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ctbsv() 4th keyword (trans) can't be converted to int"); | |||
| 17558 | if (f2py_success) { | |||
| 17559 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ctbsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctbsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 17560 | /* Processing variable diag */ | |||
| 17561 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 17562 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctbsv() 5th keyword (diag) can't be converted to int"); | |||
| 17563 | if (f2py_success) { | |||
| 17564 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ctbsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17565 | /* Processing variable incx */ | |||
| 17566 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 17567 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ctbsv() 1st keyword (incx) can't be converted to int"); | |||
| 17568 | if (f2py_success) { | |||
| 17569 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ctbsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17570 | /* Processing variable offx */ | |||
| 17571 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 17572 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ctbsv() 2nd keyword (offx) can't be converted to int"); | |||
| 17573 | if (f2py_success) { | |||
| 17574 | /* Processing variable a */ | |||
| 17575 | ; | |||
| 17576 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 17577 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 17578 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 17579 | if (!PyErr_Occurred()) | |||
| 17580 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ctbsv to C/Fortran array" ); | |||
| 17581 | } else { | |||
| 17582 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 17583 | ||||
| 17584 | /* Processing variable n */ | |||
| 17585 | n = shape(a,1)a_Dims[1]; | |||
| 17586 | CHECKSCALAR(n>=0,"n>=0","hidden n","ctbsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 17587 | /* Processing variable lda */ | |||
| 17588 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 17589 | /* Processing variable k */ | |||
| 17590 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.ctbsv() 1st argument (k) can't be converted to int"); | |||
| 17591 | if (f2py_success) { | |||
| 17592 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","ctbsv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbsv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 17593 | /* Processing variable x */ | |||
| 17594 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 17595 | ; | |||
| 17596 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 17597 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 17598 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 17599 | if (!PyErr_Occurred()) | |||
| 17600 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ctbsv to C/Fortran array" ); | |||
| 17601 | } else { | |||
| 17602 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 17603 | ||||
| 17604 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 17605 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 17606 | /*end of frompyobj*/ | |||
| 17607 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17608 | f2py_start_call_clock(); | |||
| 17609 | #endif | |||
| 17610 | /*callfortranroutine*/ | |||
| 17611 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 17612 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 17613 | if (PyErr_Occurred()) | |||
| 17614 | f2py_success = 0; | |||
| 17615 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17616 | f2py_stop_call_clock(); | |||
| 17617 | #endif | |||
| 17618 | /*end of callfortranroutine*/ | |||
| 17619 | if (f2py_success) { | |||
| 17620 | /*pyobjfrom*/ | |||
| 17621 | /*end of pyobjfrom*/ | |||
| 17622 | CFUNCSMESS("Building return value.\n"); | |||
| 17623 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 17624 | /*closepyobjfrom*/ | |||
| 17625 | /*end of closepyobjfrom*/ | |||
| 17626 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 17627 | /*cleanupfrompyobj*/ | |||
| 17628 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 17629 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 17630 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 17631 | /* End of cleaning variable x */ | |||
| 17632 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 17633 | } /*if (f2py_success) of k*/ | |||
| 17634 | /* End of cleaning variable k */ | |||
| 17635 | /* End of cleaning variable lda */ | |||
| 17636 | } /*CHECKSCALAR(n>=0)*/ | |||
| 17637 | /* End of cleaning variable n */ | |||
| 17638 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 17639 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 17640 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 17641 | /* End of cleaning variable a */ | |||
| 17642 | } /*if (f2py_success) of offx*/ | |||
| 17643 | /* End of cleaning variable offx */ | |||
| 17644 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 17645 | } /*if (f2py_success) of incx*/ | |||
| 17646 | /* End of cleaning variable incx */ | |||
| 17647 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 17648 | } /*if (f2py_success) of diag*/ | |||
| 17649 | /* End of cleaning variable diag */ | |||
| 17650 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 17651 | } /*if (f2py_success) of trans*/ | |||
| 17652 | /* End of cleaning variable trans */ | |||
| 17653 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 17654 | } /*if (f2py_success) of lower*/ | |||
| 17655 | /* End of cleaning variable lower */ | |||
| 17656 | /*end of cleanupfrompyobj*/ | |||
| 17657 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 17658 | /*routdebugfailure*/ | |||
| 17659 | } else { | |||
| 17660 | /*routdebugleave*/ | |||
| 17661 | } | |||
| 17662 | CFUNCSMESS("Freeing memory.\n"); | |||
| 17663 | /*freemem*/ | |||
| 17664 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17665 | f2py_stop_clock(); | |||
| 17666 | #endif | |||
| 17667 | return capi_buildvalue; | |||
| 17668 | } | |||
| 17669 | /******************************** end of ctbsv ********************************/ | |||
| 17670 | ||||
| 17671 | /*********************************** ztbsv ***********************************/ | |||
| 17672 | static char doc_f2py_rout__fblas_ztbsv[] = "\ | |||
| 17673 | xout = ztbsv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ztbsv``.\ | |||
| 17674 | \n\nParameters\n----------\n" | |||
| 17675 | "k : input int\n" | |||
| 17676 | "a : input rank-2 array('D') with bounds (lda,n)\n" | |||
| 17677 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 17678 | "\nOther Parameters\n----------------\n" | |||
| 17679 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 17680 | "incx : input int, optional\n Default: 1\n" | |||
| 17681 | "offx : input int, optional\n Default: 0\n" | |||
| 17682 | "lower : input int, optional\n Default: 0\n" | |||
| 17683 | "trans : input int, optional\n Default: 0\n" | |||
| 17684 | "diag : input int, optional\n Default: 0\n" | |||
| 17685 | "\nReturns\n-------\n" | |||
| 17686 | "xout : rank-1 array('D') with bounds (*) and x storage"; | |||
| 17687 | /* extern void F_FUNC(ztbsv,ZTBSV)(char*,char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 17688 | static PyObject *f2py_rout__fblas_ztbsv(const PyObject *capi_self, | |||
| 17689 | PyObject *capi_args, | |||
| 17690 | PyObject *capi_keywds, | |||
| 17691 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 17692 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 17693 | volatile int f2py_success = 1; | |||
| 17694 | /*decl*/ | |||
| 17695 | ||||
| 17696 | int n = 0; | |||
| 17697 | int k = 0; | |||
| 17698 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 17699 | complex_double *a = NULL((void*)0); | |||
| 17700 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 17701 | const int a_Rank = 2; | |||
| 17702 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 17703 | int capi_a_intent = 0; | |||
| 17704 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 17705 | int lda = 0; | |||
| 17706 | complex_double *x = NULL((void*)0); | |||
| 17707 | npy_intp x_Dims[1] = {-1}; | |||
| 17708 | const int x_Rank = 1; | |||
| 17709 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 17710 | int capi_x_intent = 0; | |||
| 17711 | int capi_overwrite_x = 0; | |||
| 17712 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 17713 | int incx = 0; | |||
| 17714 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 17715 | int offx = 0; | |||
| 17716 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 17717 | int lower = 0; | |||
| 17718 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 17719 | int trans = 0; | |||
| 17720 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 17721 | int diag = 0; | |||
| 17722 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 17723 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 17724 | ||||
| 17725 | /*routdebugenter*/ | |||
| 17726 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17727 | f2py_start_clock(); | |||
| 17728 | #endif | |||
| 17729 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 17730 | "OOO|OOOOOi:_fblas.ztbsv",\ | |||
| 17731 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 17732 | return NULL((void*)0); | |||
| 17733 | /*frompyobj*/ | |||
| 17734 | /* Processing variable lower */ | |||
| 17735 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 17736 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztbsv() 3rd keyword (lower) can't be converted to int"); | |||
| 17737 | if (f2py_success) { | |||
| 17738 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ztbsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17739 | /* Processing variable trans */ | |||
| 17740 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 17741 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ztbsv() 4th keyword (trans) can't be converted to int"); | |||
| 17742 | if (f2py_success) { | |||
| 17743 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ztbsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztbsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 17744 | /* Processing variable diag */ | |||
| 17745 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 17746 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztbsv() 5th keyword (diag) can't be converted to int"); | |||
| 17747 | if (f2py_success) { | |||
| 17748 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ztbsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17749 | /* Processing variable incx */ | |||
| 17750 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 17751 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ztbsv() 1st keyword (incx) can't be converted to int"); | |||
| 17752 | if (f2py_success) { | |||
| 17753 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ztbsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17754 | /* Processing variable offx */ | |||
| 17755 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 17756 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ztbsv() 2nd keyword (offx) can't be converted to int"); | |||
| 17757 | if (f2py_success) { | |||
| 17758 | /* Processing variable a */ | |||
| 17759 | ; | |||
| 17760 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 17761 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 17762 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 17763 | if (!PyErr_Occurred()) | |||
| 17764 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ztbsv to C/Fortran array" ); | |||
| 17765 | } else { | |||
| 17766 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 17767 | ||||
| 17768 | /* Processing variable n */ | |||
| 17769 | n = shape(a,1)a_Dims[1]; | |||
| 17770 | CHECKSCALAR(n>=0,"n>=0","hidden n","ztbsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 17771 | /* Processing variable lda */ | |||
| 17772 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 17773 | /* Processing variable k */ | |||
| 17774 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.ztbsv() 1st argument (k) can't be converted to int"); | |||
| 17775 | if (f2py_success) { | |||
| 17776 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","ztbsv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbsv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 17777 | /* Processing variable x */ | |||
| 17778 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 17779 | ; | |||
| 17780 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 17781 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 17782 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 17783 | if (!PyErr_Occurred()) | |||
| 17784 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ztbsv to C/Fortran array" ); | |||
| 17785 | } else { | |||
| 17786 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 17787 | ||||
| 17788 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 17789 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 17790 | /*end of frompyobj*/ | |||
| 17791 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17792 | f2py_start_call_clock(); | |||
| 17793 | #endif | |||
| 17794 | /*callfortranroutine*/ | |||
| 17795 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 17796 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 17797 | if (PyErr_Occurred()) | |||
| 17798 | f2py_success = 0; | |||
| 17799 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17800 | f2py_stop_call_clock(); | |||
| 17801 | #endif | |||
| 17802 | /*end of callfortranroutine*/ | |||
| 17803 | if (f2py_success) { | |||
| 17804 | /*pyobjfrom*/ | |||
| 17805 | /*end of pyobjfrom*/ | |||
| 17806 | CFUNCSMESS("Building return value.\n"); | |||
| 17807 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 17808 | /*closepyobjfrom*/ | |||
| 17809 | /*end of closepyobjfrom*/ | |||
| 17810 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 17811 | /*cleanupfrompyobj*/ | |||
| 17812 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 17813 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 17814 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 17815 | /* End of cleaning variable x */ | |||
| 17816 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 17817 | } /*if (f2py_success) of k*/ | |||
| 17818 | /* End of cleaning variable k */ | |||
| 17819 | /* End of cleaning variable lda */ | |||
| 17820 | } /*CHECKSCALAR(n>=0)*/ | |||
| 17821 | /* End of cleaning variable n */ | |||
| 17822 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 17823 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 17824 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 17825 | /* End of cleaning variable a */ | |||
| 17826 | } /*if (f2py_success) of offx*/ | |||
| 17827 | /* End of cleaning variable offx */ | |||
| 17828 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 17829 | } /*if (f2py_success) of incx*/ | |||
| 17830 | /* End of cleaning variable incx */ | |||
| 17831 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 17832 | } /*if (f2py_success) of diag*/ | |||
| 17833 | /* End of cleaning variable diag */ | |||
| 17834 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 17835 | } /*if (f2py_success) of trans*/ | |||
| 17836 | /* End of cleaning variable trans */ | |||
| 17837 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 17838 | } /*if (f2py_success) of lower*/ | |||
| 17839 | /* End of cleaning variable lower */ | |||
| 17840 | /*end of cleanupfrompyobj*/ | |||
| 17841 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 17842 | /*routdebugfailure*/ | |||
| 17843 | } else { | |||
| 17844 | /*routdebugleave*/ | |||
| 17845 | } | |||
| 17846 | CFUNCSMESS("Freeing memory.\n"); | |||
| 17847 | /*freemem*/ | |||
| 17848 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17849 | f2py_stop_clock(); | |||
| 17850 | #endif | |||
| 17851 | return capi_buildvalue; | |||
| 17852 | } | |||
| 17853 | /******************************** end of ztbsv ********************************/ | |||
| 17854 | ||||
| 17855 | /*********************************** stpsv ***********************************/ | |||
| 17856 | static char doc_f2py_rout__fblas_stpsv[] = "\ | |||
| 17857 | xout = stpsv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``stpsv``.\ | |||
| 17858 | \n\nParameters\n----------\n" | |||
| 17859 | "n : input int\n" | |||
| 17860 | "ap : input rank-1 array('f') with bounds (*)\n" | |||
| 17861 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 17862 | "\nOther Parameters\n----------------\n" | |||
| 17863 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 17864 | "incx : input int, optional\n Default: 1\n" | |||
| 17865 | "offx : input int, optional\n Default: 0\n" | |||
| 17866 | "lower : input int, optional\n Default: 0\n" | |||
| 17867 | "trans : input int, optional\n Default: 0\n" | |||
| 17868 | "diag : input int, optional\n Default: 0\n" | |||
| 17869 | "\nReturns\n-------\n" | |||
| 17870 | "xout : rank-1 array('f') with bounds (*) and x storage"; | |||
| 17871 | /* extern void F_FUNC(stpsv,STPSV)(char*,char*,char*,F_INT*,float*,float*,F_INT* ); */ | |||
| 17872 | static PyObject *f2py_rout__fblas_stpsv(const PyObject *capi_self, | |||
| 17873 | PyObject *capi_args, | |||
| 17874 | PyObject *capi_keywds, | |||
| 17875 | void (*f2py_func)(char*,char*,char*,F_INTint*,float*,float*,F_INTint* )) { | |||
| 17876 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 17877 | volatile int f2py_success = 1; | |||
| 17878 | /*decl*/ | |||
| 17879 | ||||
| 17880 | int n = 0; | |||
| 17881 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 17882 | float *ap = NULL((void*)0); | |||
| 17883 | npy_intp ap_Dims[1] = {-1}; | |||
| 17884 | const int ap_Rank = 1; | |||
| 17885 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 17886 | int capi_ap_intent = 0; | |||
| 17887 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 17888 | float *x = NULL((void*)0); | |||
| 17889 | npy_intp x_Dims[1] = {-1}; | |||
| 17890 | const int x_Rank = 1; | |||
| 17891 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 17892 | int capi_x_intent = 0; | |||
| 17893 | int capi_overwrite_x = 0; | |||
| 17894 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 17895 | int incx = 0; | |||
| 17896 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 17897 | int offx = 0; | |||
| 17898 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 17899 | int lower = 0; | |||
| 17900 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 17901 | int trans = 0; | |||
| 17902 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 17903 | int diag = 0; | |||
| 17904 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 17905 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 17906 | ||||
| 17907 | /*routdebugenter*/ | |||
| 17908 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17909 | f2py_start_clock(); | |||
| 17910 | #endif | |||
| 17911 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 17912 | "OOO|OOOOOi:_fblas.stpsv",\ | |||
| 17913 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 17914 | return NULL((void*)0); | |||
| 17915 | /*frompyobj*/ | |||
| 17916 | /* Processing variable n */ | |||
| 17917 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.stpsv() 1st argument (n) can't be converted to int"); | |||
| 17918 | if (f2py_success) { | |||
| 17919 | CHECKSCALAR(n>=0,"n>=0","1st argument n","stpsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpsv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 17920 | /* Processing variable lower */ | |||
| 17921 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 17922 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.stpsv() 3rd keyword (lower) can't be converted to int"); | |||
| 17923 | if (f2py_success) { | |||
| 17924 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","stpsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17925 | /* Processing variable trans */ | |||
| 17926 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 17927 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.stpsv() 4th keyword (trans) can't be converted to int"); | |||
| 17928 | if (f2py_success) { | |||
| 17929 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","stpsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""stpsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 17930 | /* Processing variable diag */ | |||
| 17931 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 17932 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.stpsv() 5th keyword (diag) can't be converted to int"); | |||
| 17933 | if (f2py_success) { | |||
| 17934 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","stpsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17935 | /* Processing variable incx */ | |||
| 17936 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 17937 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.stpsv() 1st keyword (incx) can't be converted to int"); | |||
| 17938 | if (f2py_success) { | |||
| 17939 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","stpsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 17940 | /* Processing variable offx */ | |||
| 17941 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 17942 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.stpsv() 2nd keyword (offx) can't be converted to int"); | |||
| 17943 | if (f2py_success) { | |||
| 17944 | /* Processing variable ap */ | |||
| 17945 | ; | |||
| 17946 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 17947 | capi_ap_tmp = array_from_pyobj(NPY_FLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 17948 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 17949 | if (!PyErr_Occurred()) | |||
| 17950 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.stpsv to C/Fortran array" ); | |||
| 17951 | } else { | |||
| 17952 | ap = (float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 17953 | ||||
| 17954 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 17955 | /* Processing variable x */ | |||
| 17956 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 17957 | ; | |||
| 17958 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 17959 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 17960 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 17961 | if (!PyErr_Occurred()) | |||
| 17962 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.stpsv to C/Fortran array" ); | |||
| 17963 | } else { | |||
| 17964 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 17965 | ||||
| 17966 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 17967 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 17968 | /*end of frompyobj*/ | |||
| 17969 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17970 | f2py_start_call_clock(); | |||
| 17971 | #endif | |||
| 17972 | /*callfortranroutine*/ | |||
| 17973 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 17974 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 17975 | if (PyErr_Occurred()) | |||
| 17976 | f2py_success = 0; | |||
| 17977 | #ifdef F2PY_REPORT_ATEXIT | |||
| 17978 | f2py_stop_call_clock(); | |||
| 17979 | #endif | |||
| 17980 | /*end of callfortranroutine*/ | |||
| 17981 | if (f2py_success) { | |||
| 17982 | /*pyobjfrom*/ | |||
| 17983 | /*end of pyobjfrom*/ | |||
| 17984 | CFUNCSMESS("Building return value.\n"); | |||
| 17985 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 17986 | /*closepyobjfrom*/ | |||
| 17987 | /*end of closepyobjfrom*/ | |||
| 17988 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 17989 | /*cleanupfrompyobj*/ | |||
| 17990 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 17991 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 17992 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 17993 | /* End of cleaning variable x */ | |||
| 17994 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 17995 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 17996 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 17997 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 17998 | /* End of cleaning variable ap */ | |||
| 17999 | } /*if (f2py_success) of offx*/ | |||
| 18000 | /* End of cleaning variable offx */ | |||
| 18001 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 18002 | } /*if (f2py_success) of incx*/ | |||
| 18003 | /* End of cleaning variable incx */ | |||
| 18004 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 18005 | } /*if (f2py_success) of diag*/ | |||
| 18006 | /* End of cleaning variable diag */ | |||
| 18007 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 18008 | } /*if (f2py_success) of trans*/ | |||
| 18009 | /* End of cleaning variable trans */ | |||
| 18010 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 18011 | } /*if (f2py_success) of lower*/ | |||
| 18012 | /* End of cleaning variable lower */ | |||
| 18013 | } /*CHECKSCALAR(n>=0)*/ | |||
| 18014 | } /*if (f2py_success) of n*/ | |||
| 18015 | /* End of cleaning variable n */ | |||
| 18016 | /*end of cleanupfrompyobj*/ | |||
| 18017 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 18018 | /*routdebugfailure*/ | |||
| 18019 | } else { | |||
| 18020 | /*routdebugleave*/ | |||
| 18021 | } | |||
| 18022 | CFUNCSMESS("Freeing memory.\n"); | |||
| 18023 | /*freemem*/ | |||
| 18024 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18025 | f2py_stop_clock(); | |||
| 18026 | #endif | |||
| 18027 | return capi_buildvalue; | |||
| 18028 | } | |||
| 18029 | /******************************** end of stpsv ********************************/ | |||
| 18030 | ||||
| 18031 | /*********************************** dtpsv ***********************************/ | |||
| 18032 | static char doc_f2py_rout__fblas_dtpsv[] = "\ | |||
| 18033 | xout = dtpsv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``dtpsv``.\ | |||
| 18034 | \n\nParameters\n----------\n" | |||
| 18035 | "n : input int\n" | |||
| 18036 | "ap : input rank-1 array('d') with bounds (*)\n" | |||
| 18037 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 18038 | "\nOther Parameters\n----------------\n" | |||
| 18039 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 18040 | "incx : input int, optional\n Default: 1\n" | |||
| 18041 | "offx : input int, optional\n Default: 0\n" | |||
| 18042 | "lower : input int, optional\n Default: 0\n" | |||
| 18043 | "trans : input int, optional\n Default: 0\n" | |||
| 18044 | "diag : input int, optional\n Default: 0\n" | |||
| 18045 | "\nReturns\n-------\n" | |||
| 18046 | "xout : rank-1 array('d') with bounds (*) and x storage"; | |||
| 18047 | /* extern void F_FUNC(dtpsv,DTPSV)(char*,char*,char*,F_INT*,double*,double*,F_INT* ); */ | |||
| 18048 | static PyObject *f2py_rout__fblas_dtpsv(const PyObject *capi_self, | |||
| 18049 | PyObject *capi_args, | |||
| 18050 | PyObject *capi_keywds, | |||
| 18051 | void (*f2py_func)(char*,char*,char*,F_INTint*,double*,double*,F_INTint* )) { | |||
| 18052 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 18053 | volatile int f2py_success = 1; | |||
| 18054 | /*decl*/ | |||
| 18055 | ||||
| 18056 | int n = 0; | |||
| 18057 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 18058 | double *ap = NULL((void*)0); | |||
| 18059 | npy_intp ap_Dims[1] = {-1}; | |||
| 18060 | const int ap_Rank = 1; | |||
| 18061 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 18062 | int capi_ap_intent = 0; | |||
| 18063 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 18064 | double *x = NULL((void*)0); | |||
| 18065 | npy_intp x_Dims[1] = {-1}; | |||
| 18066 | const int x_Rank = 1; | |||
| 18067 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 18068 | int capi_x_intent = 0; | |||
| 18069 | int capi_overwrite_x = 0; | |||
| 18070 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 18071 | int incx = 0; | |||
| 18072 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 18073 | int offx = 0; | |||
| 18074 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 18075 | int lower = 0; | |||
| 18076 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 18077 | int trans = 0; | |||
| 18078 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 18079 | int diag = 0; | |||
| 18080 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 18081 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 18082 | ||||
| 18083 | /*routdebugenter*/ | |||
| 18084 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18085 | f2py_start_clock(); | |||
| 18086 | #endif | |||
| 18087 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 18088 | "OOO|OOOOOi:_fblas.dtpsv",\ | |||
| 18089 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 18090 | return NULL((void*)0); | |||
| 18091 | /*frompyobj*/ | |||
| 18092 | /* Processing variable n */ | |||
| 18093 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dtpsv() 1st argument (n) can't be converted to int"); | |||
| 18094 | if (f2py_success) { | |||
| 18095 | CHECKSCALAR(n>=0,"n>=0","1st argument n","dtpsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpsv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 18096 | /* Processing variable lower */ | |||
| 18097 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 18098 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtpsv() 3rd keyword (lower) can't be converted to int"); | |||
| 18099 | if (f2py_success) { | |||
| 18100 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","dtpsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18101 | /* Processing variable trans */ | |||
| 18102 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 18103 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dtpsv() 4th keyword (trans) can't be converted to int"); | |||
| 18104 | if (f2py_success) { | |||
| 18105 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","dtpsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtpsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18106 | /* Processing variable diag */ | |||
| 18107 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 18108 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtpsv() 5th keyword (diag) can't be converted to int"); | |||
| 18109 | if (f2py_success) { | |||
| 18110 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","dtpsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18111 | /* Processing variable incx */ | |||
| 18112 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 18113 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dtpsv() 1st keyword (incx) can't be converted to int"); | |||
| 18114 | if (f2py_success) { | |||
| 18115 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dtpsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18116 | /* Processing variable offx */ | |||
| 18117 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 18118 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dtpsv() 2nd keyword (offx) can't be converted to int"); | |||
| 18119 | if (f2py_success) { | |||
| 18120 | /* Processing variable ap */ | |||
| 18121 | ; | |||
| 18122 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 18123 | capi_ap_tmp = array_from_pyobj(NPY_DOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 18124 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 18125 | if (!PyErr_Occurred()) | |||
| 18126 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.dtpsv to C/Fortran array" ); | |||
| 18127 | } else { | |||
| 18128 | ap = (double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 18129 | ||||
| 18130 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 18131 | /* Processing variable x */ | |||
| 18132 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 18133 | ; | |||
| 18134 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 18135 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 18136 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 18137 | if (!PyErr_Occurred()) | |||
| 18138 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dtpsv to C/Fortran array" ); | |||
| 18139 | } else { | |||
| 18140 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 18141 | ||||
| 18142 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 18143 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 18144 | /*end of frompyobj*/ | |||
| 18145 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18146 | f2py_start_call_clock(); | |||
| 18147 | #endif | |||
| 18148 | /*callfortranroutine*/ | |||
| 18149 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 18150 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 18151 | if (PyErr_Occurred()) | |||
| 18152 | f2py_success = 0; | |||
| 18153 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18154 | f2py_stop_call_clock(); | |||
| 18155 | #endif | |||
| 18156 | /*end of callfortranroutine*/ | |||
| 18157 | if (f2py_success) { | |||
| 18158 | /*pyobjfrom*/ | |||
| 18159 | /*end of pyobjfrom*/ | |||
| 18160 | CFUNCSMESS("Building return value.\n"); | |||
| 18161 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 18162 | /*closepyobjfrom*/ | |||
| 18163 | /*end of closepyobjfrom*/ | |||
| 18164 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 18165 | /*cleanupfrompyobj*/ | |||
| 18166 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 18167 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 18168 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 18169 | /* End of cleaning variable x */ | |||
| 18170 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 18171 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 18172 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 18173 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 18174 | /* End of cleaning variable ap */ | |||
| 18175 | } /*if (f2py_success) of offx*/ | |||
| 18176 | /* End of cleaning variable offx */ | |||
| 18177 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 18178 | } /*if (f2py_success) of incx*/ | |||
| 18179 | /* End of cleaning variable incx */ | |||
| 18180 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 18181 | } /*if (f2py_success) of diag*/ | |||
| 18182 | /* End of cleaning variable diag */ | |||
| 18183 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 18184 | } /*if (f2py_success) of trans*/ | |||
| 18185 | /* End of cleaning variable trans */ | |||
| 18186 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 18187 | } /*if (f2py_success) of lower*/ | |||
| 18188 | /* End of cleaning variable lower */ | |||
| 18189 | } /*CHECKSCALAR(n>=0)*/ | |||
| 18190 | } /*if (f2py_success) of n*/ | |||
| 18191 | /* End of cleaning variable n */ | |||
| 18192 | /*end of cleanupfrompyobj*/ | |||
| 18193 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 18194 | /*routdebugfailure*/ | |||
| 18195 | } else { | |||
| 18196 | /*routdebugleave*/ | |||
| 18197 | } | |||
| 18198 | CFUNCSMESS("Freeing memory.\n"); | |||
| 18199 | /*freemem*/ | |||
| 18200 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18201 | f2py_stop_clock(); | |||
| 18202 | #endif | |||
| 18203 | return capi_buildvalue; | |||
| 18204 | } | |||
| 18205 | /******************************** end of dtpsv ********************************/ | |||
| 18206 | ||||
| 18207 | /*********************************** ctpsv ***********************************/ | |||
| 18208 | static char doc_f2py_rout__fblas_ctpsv[] = "\ | |||
| 18209 | xout = ctpsv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ctpsv``.\ | |||
| 18210 | \n\nParameters\n----------\n" | |||
| 18211 | "n : input int\n" | |||
| 18212 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 18213 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 18214 | "\nOther Parameters\n----------------\n" | |||
| 18215 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 18216 | "incx : input int, optional\n Default: 1\n" | |||
| 18217 | "offx : input int, optional\n Default: 0\n" | |||
| 18218 | "lower : input int, optional\n Default: 0\n" | |||
| 18219 | "trans : input int, optional\n Default: 0\n" | |||
| 18220 | "diag : input int, optional\n Default: 0\n" | |||
| 18221 | "\nReturns\n-------\n" | |||
| 18222 | "xout : rank-1 array('F') with bounds (*) and x storage"; | |||
| 18223 | /* extern void F_FUNC(ctpsv,CTPSV)(char*,char*,char*,F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 18224 | static PyObject *f2py_rout__fblas_ctpsv(const PyObject *capi_self, | |||
| 18225 | PyObject *capi_args, | |||
| 18226 | PyObject *capi_keywds, | |||
| 18227 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 18228 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 18229 | volatile int f2py_success = 1; | |||
| 18230 | /*decl*/ | |||
| 18231 | ||||
| 18232 | int n = 0; | |||
| 18233 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 18234 | complex_float *ap = NULL((void*)0); | |||
| 18235 | npy_intp ap_Dims[1] = {-1}; | |||
| 18236 | const int ap_Rank = 1; | |||
| 18237 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 18238 | int capi_ap_intent = 0; | |||
| 18239 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 18240 | complex_float *x = NULL((void*)0); | |||
| 18241 | npy_intp x_Dims[1] = {-1}; | |||
| 18242 | const int x_Rank = 1; | |||
| 18243 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 18244 | int capi_x_intent = 0; | |||
| 18245 | int capi_overwrite_x = 0; | |||
| 18246 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 18247 | int incx = 0; | |||
| 18248 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 18249 | int offx = 0; | |||
| 18250 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 18251 | int lower = 0; | |||
| 18252 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 18253 | int trans = 0; | |||
| 18254 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 18255 | int diag = 0; | |||
| 18256 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 18257 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 18258 | ||||
| 18259 | /*routdebugenter*/ | |||
| 18260 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18261 | f2py_start_clock(); | |||
| 18262 | #endif | |||
| 18263 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 18264 | "OOO|OOOOOi:_fblas.ctpsv",\ | |||
| 18265 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 18266 | return NULL((void*)0); | |||
| 18267 | /*frompyobj*/ | |||
| 18268 | /* Processing variable n */ | |||
| 18269 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ctpsv() 1st argument (n) can't be converted to int"); | |||
| 18270 | if (f2py_success) { | |||
| 18271 | CHECKSCALAR(n>=0,"n>=0","1st argument n","ctpsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpsv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 18272 | /* Processing variable lower */ | |||
| 18273 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 18274 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctpsv() 3rd keyword (lower) can't be converted to int"); | |||
| 18275 | if (f2py_success) { | |||
| 18276 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ctpsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18277 | /* Processing variable trans */ | |||
| 18278 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 18279 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ctpsv() 4th keyword (trans) can't be converted to int"); | |||
| 18280 | if (f2py_success) { | |||
| 18281 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ctpsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctpsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18282 | /* Processing variable diag */ | |||
| 18283 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 18284 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctpsv() 5th keyword (diag) can't be converted to int"); | |||
| 18285 | if (f2py_success) { | |||
| 18286 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ctpsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18287 | /* Processing variable incx */ | |||
| 18288 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 18289 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ctpsv() 1st keyword (incx) can't be converted to int"); | |||
| 18290 | if (f2py_success) { | |||
| 18291 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ctpsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18292 | /* Processing variable offx */ | |||
| 18293 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 18294 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ctpsv() 2nd keyword (offx) can't be converted to int"); | |||
| 18295 | if (f2py_success) { | |||
| 18296 | /* Processing variable ap */ | |||
| 18297 | ; | |||
| 18298 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 18299 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 18300 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 18301 | if (!PyErr_Occurred()) | |||
| 18302 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.ctpsv to C/Fortran array" ); | |||
| 18303 | } else { | |||
| 18304 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 18305 | ||||
| 18306 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 18307 | /* Processing variable x */ | |||
| 18308 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 18309 | ; | |||
| 18310 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 18311 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 18312 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 18313 | if (!PyErr_Occurred()) | |||
| 18314 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ctpsv to C/Fortran array" ); | |||
| 18315 | } else { | |||
| 18316 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 18317 | ||||
| 18318 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 18319 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 18320 | /*end of frompyobj*/ | |||
| 18321 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18322 | f2py_start_call_clock(); | |||
| 18323 | #endif | |||
| 18324 | /*callfortranroutine*/ | |||
| 18325 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 18326 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 18327 | if (PyErr_Occurred()) | |||
| 18328 | f2py_success = 0; | |||
| 18329 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18330 | f2py_stop_call_clock(); | |||
| 18331 | #endif | |||
| 18332 | /*end of callfortranroutine*/ | |||
| 18333 | if (f2py_success) { | |||
| 18334 | /*pyobjfrom*/ | |||
| 18335 | /*end of pyobjfrom*/ | |||
| 18336 | CFUNCSMESS("Building return value.\n"); | |||
| 18337 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 18338 | /*closepyobjfrom*/ | |||
| 18339 | /*end of closepyobjfrom*/ | |||
| 18340 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 18341 | /*cleanupfrompyobj*/ | |||
| 18342 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 18343 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 18344 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 18345 | /* End of cleaning variable x */ | |||
| 18346 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 18347 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 18348 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 18349 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 18350 | /* End of cleaning variable ap */ | |||
| 18351 | } /*if (f2py_success) of offx*/ | |||
| 18352 | /* End of cleaning variable offx */ | |||
| 18353 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 18354 | } /*if (f2py_success) of incx*/ | |||
| 18355 | /* End of cleaning variable incx */ | |||
| 18356 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 18357 | } /*if (f2py_success) of diag*/ | |||
| 18358 | /* End of cleaning variable diag */ | |||
| 18359 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 18360 | } /*if (f2py_success) of trans*/ | |||
| 18361 | /* End of cleaning variable trans */ | |||
| 18362 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 18363 | } /*if (f2py_success) of lower*/ | |||
| 18364 | /* End of cleaning variable lower */ | |||
| 18365 | } /*CHECKSCALAR(n>=0)*/ | |||
| 18366 | } /*if (f2py_success) of n*/ | |||
| 18367 | /* End of cleaning variable n */ | |||
| 18368 | /*end of cleanupfrompyobj*/ | |||
| 18369 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 18370 | /*routdebugfailure*/ | |||
| 18371 | } else { | |||
| 18372 | /*routdebugleave*/ | |||
| 18373 | } | |||
| 18374 | CFUNCSMESS("Freeing memory.\n"); | |||
| 18375 | /*freemem*/ | |||
| 18376 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18377 | f2py_stop_clock(); | |||
| 18378 | #endif | |||
| 18379 | return capi_buildvalue; | |||
| 18380 | } | |||
| 18381 | /******************************** end of ctpsv ********************************/ | |||
| 18382 | ||||
| 18383 | /*********************************** ztpsv ***********************************/ | |||
| 18384 | static char doc_f2py_rout__fblas_ztpsv[] = "\ | |||
| 18385 | xout = ztpsv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ztpsv``.\ | |||
| 18386 | \n\nParameters\n----------\n" | |||
| 18387 | "n : input int\n" | |||
| 18388 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 18389 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 18390 | "\nOther Parameters\n----------------\n" | |||
| 18391 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 18392 | "incx : input int, optional\n Default: 1\n" | |||
| 18393 | "offx : input int, optional\n Default: 0\n" | |||
| 18394 | "lower : input int, optional\n Default: 0\n" | |||
| 18395 | "trans : input int, optional\n Default: 0\n" | |||
| 18396 | "diag : input int, optional\n Default: 0\n" | |||
| 18397 | "\nReturns\n-------\n" | |||
| 18398 | "xout : rank-1 array('D') with bounds (*) and x storage"; | |||
| 18399 | /* extern void F_FUNC(ztpsv,ZTPSV)(char*,char*,char*,F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 18400 | static PyObject *f2py_rout__fblas_ztpsv(const PyObject *capi_self, | |||
| 18401 | PyObject *capi_args, | |||
| 18402 | PyObject *capi_keywds, | |||
| 18403 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 18404 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 18405 | volatile int f2py_success = 1; | |||
| 18406 | /*decl*/ | |||
| 18407 | ||||
| 18408 | int n = 0; | |||
| 18409 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 18410 | complex_double *ap = NULL((void*)0); | |||
| 18411 | npy_intp ap_Dims[1] = {-1}; | |||
| 18412 | const int ap_Rank = 1; | |||
| 18413 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 18414 | int capi_ap_intent = 0; | |||
| 18415 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 18416 | complex_double *x = NULL((void*)0); | |||
| 18417 | npy_intp x_Dims[1] = {-1}; | |||
| 18418 | const int x_Rank = 1; | |||
| 18419 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 18420 | int capi_x_intent = 0; | |||
| 18421 | int capi_overwrite_x = 0; | |||
| 18422 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 18423 | int incx = 0; | |||
| 18424 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 18425 | int offx = 0; | |||
| 18426 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 18427 | int lower = 0; | |||
| 18428 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 18429 | int trans = 0; | |||
| 18430 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 18431 | int diag = 0; | |||
| 18432 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 18433 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 18434 | ||||
| 18435 | /*routdebugenter*/ | |||
| 18436 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18437 | f2py_start_clock(); | |||
| 18438 | #endif | |||
| 18439 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 18440 | "OOO|OOOOOi:_fblas.ztpsv",\ | |||
| 18441 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 18442 | return NULL((void*)0); | |||
| 18443 | /*frompyobj*/ | |||
| 18444 | /* Processing variable n */ | |||
| 18445 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ztpsv() 1st argument (n) can't be converted to int"); | |||
| 18446 | if (f2py_success) { | |||
| 18447 | CHECKSCALAR(n>=0,"n>=0","1st argument n","ztpsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpsv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 18448 | /* Processing variable lower */ | |||
| 18449 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 18450 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztpsv() 3rd keyword (lower) can't be converted to int"); | |||
| 18451 | if (f2py_success) { | |||
| 18452 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ztpsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18453 | /* Processing variable trans */ | |||
| 18454 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 18455 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ztpsv() 4th keyword (trans) can't be converted to int"); | |||
| 18456 | if (f2py_success) { | |||
| 18457 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ztpsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztpsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18458 | /* Processing variable diag */ | |||
| 18459 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 18460 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztpsv() 5th keyword (diag) can't be converted to int"); | |||
| 18461 | if (f2py_success) { | |||
| 18462 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ztpsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18463 | /* Processing variable incx */ | |||
| 18464 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 18465 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ztpsv() 1st keyword (incx) can't be converted to int"); | |||
| 18466 | if (f2py_success) { | |||
| 18467 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ztpsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18468 | /* Processing variable offx */ | |||
| 18469 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 18470 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ztpsv() 2nd keyword (offx) can't be converted to int"); | |||
| 18471 | if (f2py_success) { | |||
| 18472 | /* Processing variable ap */ | |||
| 18473 | ; | |||
| 18474 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 18475 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 18476 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 18477 | if (!PyErr_Occurred()) | |||
| 18478 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.ztpsv to C/Fortran array" ); | |||
| 18479 | } else { | |||
| 18480 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 18481 | ||||
| 18482 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 18483 | /* Processing variable x */ | |||
| 18484 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 18485 | ; | |||
| 18486 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 18487 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 18488 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 18489 | if (!PyErr_Occurred()) | |||
| 18490 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ztpsv to C/Fortran array" ); | |||
| 18491 | } else { | |||
| 18492 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 18493 | ||||
| 18494 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 18495 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 18496 | /*end of frompyobj*/ | |||
| 18497 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18498 | f2py_start_call_clock(); | |||
| 18499 | #endif | |||
| 18500 | /*callfortranroutine*/ | |||
| 18501 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 18502 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 18503 | if (PyErr_Occurred()) | |||
| 18504 | f2py_success = 0; | |||
| 18505 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18506 | f2py_stop_call_clock(); | |||
| 18507 | #endif | |||
| 18508 | /*end of callfortranroutine*/ | |||
| 18509 | if (f2py_success) { | |||
| 18510 | /*pyobjfrom*/ | |||
| 18511 | /*end of pyobjfrom*/ | |||
| 18512 | CFUNCSMESS("Building return value.\n"); | |||
| 18513 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 18514 | /*closepyobjfrom*/ | |||
| 18515 | /*end of closepyobjfrom*/ | |||
| 18516 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 18517 | /*cleanupfrompyobj*/ | |||
| 18518 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 18519 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 18520 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 18521 | /* End of cleaning variable x */ | |||
| 18522 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 18523 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 18524 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 18525 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 18526 | /* End of cleaning variable ap */ | |||
| 18527 | } /*if (f2py_success) of offx*/ | |||
| 18528 | /* End of cleaning variable offx */ | |||
| 18529 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 18530 | } /*if (f2py_success) of incx*/ | |||
| 18531 | /* End of cleaning variable incx */ | |||
| 18532 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 18533 | } /*if (f2py_success) of diag*/ | |||
| 18534 | /* End of cleaning variable diag */ | |||
| 18535 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 18536 | } /*if (f2py_success) of trans*/ | |||
| 18537 | /* End of cleaning variable trans */ | |||
| 18538 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 18539 | } /*if (f2py_success) of lower*/ | |||
| 18540 | /* End of cleaning variable lower */ | |||
| 18541 | } /*CHECKSCALAR(n>=0)*/ | |||
| 18542 | } /*if (f2py_success) of n*/ | |||
| 18543 | /* End of cleaning variable n */ | |||
| 18544 | /*end of cleanupfrompyobj*/ | |||
| 18545 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 18546 | /*routdebugfailure*/ | |||
| 18547 | } else { | |||
| 18548 | /*routdebugleave*/ | |||
| 18549 | } | |||
| 18550 | CFUNCSMESS("Freeing memory.\n"); | |||
| 18551 | /*freemem*/ | |||
| 18552 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18553 | f2py_stop_clock(); | |||
| 18554 | #endif | |||
| 18555 | return capi_buildvalue; | |||
| 18556 | } | |||
| 18557 | /******************************** end of ztpsv ********************************/ | |||
| 18558 | ||||
| 18559 | /*********************************** strmv ***********************************/ | |||
| 18560 | static char doc_f2py_rout__fblas_strmv[] = "\ | |||
| 18561 | x = strmv(a,x,[offx,incx,lower,trans,diag,overwrite_x])\n\nWrapper for ``strmv``.\ | |||
| 18562 | \n\nParameters\n----------\n" | |||
| 18563 | "a : input rank-2 array('f') with bounds (n,n)\n" | |||
| 18564 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 18565 | "\nOther Parameters\n----------------\n" | |||
| 18566 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 18567 | "offx : input int, optional\n Default: 0\n" | |||
| 18568 | "incx : input int, optional\n Default: 1\n" | |||
| 18569 | "lower : input int, optional\n Default: 0\n" | |||
| 18570 | "trans : input int, optional\n Default: 0\n" | |||
| 18571 | "diag : input int, optional\n Default: 0\n" | |||
| 18572 | "\nReturns\n-------\n" | |||
| 18573 | "x : rank-1 array('f') with bounds (*)"; | |||
| 18574 | /* extern void F_FUNC(strmv,STRMV)(char*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 18575 | static PyObject *f2py_rout__fblas_strmv(const PyObject *capi_self, | |||
| 18576 | PyObject *capi_args, | |||
| 18577 | PyObject *capi_keywds, | |||
| 18578 | void (*f2py_func)(char*,char*,char*,F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 18579 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 18580 | volatile int f2py_success = 1; | |||
| 18581 | /*decl*/ | |||
| 18582 | ||||
| 18583 | int n = 0; | |||
| 18584 | float *a = NULL((void*)0); | |||
| 18585 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 18586 | const int a_Rank = 2; | |||
| 18587 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 18588 | int capi_a_intent = 0; | |||
| 18589 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 18590 | float *x = NULL((void*)0); | |||
| 18591 | npy_intp x_Dims[1] = {-1}; | |||
| 18592 | const int x_Rank = 1; | |||
| 18593 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 18594 | int capi_x_intent = 0; | |||
| 18595 | int capi_overwrite_x = 0; | |||
| 18596 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 18597 | int offx = 0; | |||
| 18598 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 18599 | int incx = 0; | |||
| 18600 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 18601 | int lower = 0; | |||
| 18602 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 18603 | int trans = 0; | |||
| 18604 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 18605 | int diag = 0; | |||
| 18606 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 18607 | static char *capi_kwlist[] = {"a","x","offx","incx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 18608 | ||||
| 18609 | /*routdebugenter*/ | |||
| 18610 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18611 | f2py_start_clock(); | |||
| 18612 | #endif | |||
| 18613 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 18614 | "OO|OOOOOi:_fblas.strmv",\ | |||
| 18615 | capi_kwlist,&a_capi,&x_capi,&offx_capi,&incx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 18616 | return NULL((void*)0); | |||
| 18617 | /*frompyobj*/ | |||
| 18618 | /* Processing variable trans */ | |||
| 18619 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 18620 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.strmv() 4th keyword (trans) can't be converted to int"); | |||
| 18621 | if (f2py_success) { | |||
| 18622 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","4th keyword trans","strmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18623 | /* Processing variable lower */ | |||
| 18624 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 18625 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.strmv() 3rd keyword (lower) can't be converted to int"); | |||
| 18626 | if (f2py_success) { | |||
| 18627 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","3rd keyword lower","strmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strmv:lower=%d", "(""lower==0||lower==1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18628 | /* Processing variable diag */ | |||
| 18629 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 18630 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.strmv() 5th keyword (diag) can't be converted to int"); | |||
| 18631 | if (f2py_success) { | |||
| 18632 | CHECKSCALAR(diag==0||diag==1,"diag==0||diag==1","5th keyword diag","strmv:diag=%d",diag)if (!(diag==0||diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strmv:diag=%d", "(""diag==0||diag==1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18633 | /* Processing variable incx */ | |||
| 18634 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 18635 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.strmv() 2nd keyword (incx) can't be converted to int"); | |||
| 18636 | if (f2py_success) { | |||
| 18637 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","strmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strmv:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18638 | /* Processing variable x */ | |||
| 18639 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 18640 | ; | |||
| 18641 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 18642 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 18643 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 18644 | if (!PyErr_Occurred()) | |||
| 18645 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.strmv to C/Fortran array" ); | |||
| 18646 | } else { | |||
| 18647 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 18648 | ||||
| 18649 | /* Processing variable a */ | |||
| 18650 | ; | |||
| 18651 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 18652 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 18653 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 18654 | if (!PyErr_Occurred()) | |||
| 18655 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.strmv to C/Fortran array" ); | |||
| 18656 | } else { | |||
| 18657 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 18658 | ||||
| 18659 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 18660 | /* Processing variable offx */ | |||
| 18661 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 18662 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.strmv() 1st keyword (offx) can't be converted to int"); | |||
| 18663 | if (f2py_success) { | |||
| 18664 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","1st keyword offx","strmv:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strmv:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""1st keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18665 | /* Processing variable n */ | |||
| 18666 | n = shape(a,0)a_Dims[0]; | |||
| 18667 | CHECKSCALAR(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","hidden n","strmv:n=%d",n)if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strmv:n=%d", "(""len(x)>offx+(n-1)*abs(incx)" ") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18668 | /*end of frompyobj*/ | |||
| 18669 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18670 | f2py_start_call_clock(); | |||
| 18671 | #endif | |||
| 18672 | /*callfortranroutine*/ | |||
| 18673 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), (diag?"U":"N"),&n,a,&n,x+offx,&incx) ; | |||
| 18674 | /*(*f2py_func)(&n,a,x,&offx,&incx,&lower,&trans,&diag);*/ | |||
| 18675 | if (PyErr_Occurred()) | |||
| 18676 | f2py_success = 0; | |||
| 18677 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18678 | f2py_stop_call_clock(); | |||
| 18679 | #endif | |||
| 18680 | /*end of callfortranroutine*/ | |||
| 18681 | if (f2py_success) { | |||
| 18682 | /*pyobjfrom*/ | |||
| 18683 | /*end of pyobjfrom*/ | |||
| 18684 | CFUNCSMESS("Building return value.\n"); | |||
| 18685 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 18686 | /*closepyobjfrom*/ | |||
| 18687 | /*end of closepyobjfrom*/ | |||
| 18688 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 18689 | /*cleanupfrompyobj*/ | |||
| 18690 | } /*CHECKSCALAR(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 18691 | /* End of cleaning variable n */ | |||
| 18692 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 18693 | } /*if (f2py_success) of offx*/ | |||
| 18694 | /* End of cleaning variable offx */ | |||
| 18695 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 18696 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 18697 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 18698 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 18699 | /* End of cleaning variable a */ | |||
| 18700 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 18701 | /* End of cleaning variable x */ | |||
| 18702 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 18703 | } /*if (f2py_success) of incx*/ | |||
| 18704 | /* End of cleaning variable incx */ | |||
| 18705 | } /*CHECKSCALAR(diag==0||diag==1)*/ | |||
| 18706 | } /*if (f2py_success) of diag*/ | |||
| 18707 | /* End of cleaning variable diag */ | |||
| 18708 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 18709 | } /*if (f2py_success) of lower*/ | |||
| 18710 | /* End of cleaning variable lower */ | |||
| 18711 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 18712 | } /*if (f2py_success) of trans*/ | |||
| 18713 | /* End of cleaning variable trans */ | |||
| 18714 | /*end of cleanupfrompyobj*/ | |||
| 18715 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 18716 | /*routdebugfailure*/ | |||
| 18717 | } else { | |||
| 18718 | /*routdebugleave*/ | |||
| 18719 | } | |||
| 18720 | CFUNCSMESS("Freeing memory.\n"); | |||
| 18721 | /*freemem*/ | |||
| 18722 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18723 | f2py_stop_clock(); | |||
| 18724 | #endif | |||
| 18725 | return capi_buildvalue; | |||
| 18726 | } | |||
| 18727 | /******************************** end of strmv ********************************/ | |||
| 18728 | ||||
| 18729 | /*********************************** dtrmv ***********************************/ | |||
| 18730 | static char doc_f2py_rout__fblas_dtrmv[] = "\ | |||
| 18731 | x = dtrmv(a,x,[offx,incx,lower,trans,diag,overwrite_x])\n\nWrapper for ``dtrmv``.\ | |||
| 18732 | \n\nParameters\n----------\n" | |||
| 18733 | "a : input rank-2 array('d') with bounds (n,n)\n" | |||
| 18734 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 18735 | "\nOther Parameters\n----------------\n" | |||
| 18736 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 18737 | "offx : input int, optional\n Default: 0\n" | |||
| 18738 | "incx : input int, optional\n Default: 1\n" | |||
| 18739 | "lower : input int, optional\n Default: 0\n" | |||
| 18740 | "trans : input int, optional\n Default: 0\n" | |||
| 18741 | "diag : input int, optional\n Default: 0\n" | |||
| 18742 | "\nReturns\n-------\n" | |||
| 18743 | "x : rank-1 array('d') with bounds (*)"; | |||
| 18744 | /* extern void F_FUNC(dtrmv,DTRMV)(char*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 18745 | static PyObject *f2py_rout__fblas_dtrmv(const PyObject *capi_self, | |||
| 18746 | PyObject *capi_args, | |||
| 18747 | PyObject *capi_keywds, | |||
| 18748 | void (*f2py_func)(char*,char*,char*,F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 18749 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 18750 | volatile int f2py_success = 1; | |||
| 18751 | /*decl*/ | |||
| 18752 | ||||
| 18753 | int n = 0; | |||
| 18754 | double *a = NULL((void*)0); | |||
| 18755 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 18756 | const int a_Rank = 2; | |||
| 18757 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 18758 | int capi_a_intent = 0; | |||
| 18759 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 18760 | double *x = NULL((void*)0); | |||
| 18761 | npy_intp x_Dims[1] = {-1}; | |||
| 18762 | const int x_Rank = 1; | |||
| 18763 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 18764 | int capi_x_intent = 0; | |||
| 18765 | int capi_overwrite_x = 0; | |||
| 18766 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 18767 | int offx = 0; | |||
| 18768 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 18769 | int incx = 0; | |||
| 18770 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 18771 | int lower = 0; | |||
| 18772 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 18773 | int trans = 0; | |||
| 18774 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 18775 | int diag = 0; | |||
| 18776 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 18777 | static char *capi_kwlist[] = {"a","x","offx","incx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 18778 | ||||
| 18779 | /*routdebugenter*/ | |||
| 18780 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18781 | f2py_start_clock(); | |||
| 18782 | #endif | |||
| 18783 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 18784 | "OO|OOOOOi:_fblas.dtrmv",\ | |||
| 18785 | capi_kwlist,&a_capi,&x_capi,&offx_capi,&incx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 18786 | return NULL((void*)0); | |||
| 18787 | /*frompyobj*/ | |||
| 18788 | /* Processing variable trans */ | |||
| 18789 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 18790 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dtrmv() 4th keyword (trans) can't be converted to int"); | |||
| 18791 | if (f2py_success) { | |||
| 18792 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","4th keyword trans","dtrmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18793 | /* Processing variable lower */ | |||
| 18794 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 18795 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtrmv() 3rd keyword (lower) can't be converted to int"); | |||
| 18796 | if (f2py_success) { | |||
| 18797 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","3rd keyword lower","dtrmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrmv:lower=%d", "(""lower==0||lower==1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18798 | /* Processing variable diag */ | |||
| 18799 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 18800 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtrmv() 5th keyword (diag) can't be converted to int"); | |||
| 18801 | if (f2py_success) { | |||
| 18802 | CHECKSCALAR(diag==0||diag==1,"diag==0||diag==1","5th keyword diag","dtrmv:diag=%d",diag)if (!(diag==0||diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrmv:diag=%d", "(""diag==0||diag==1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18803 | /* Processing variable incx */ | |||
| 18804 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 18805 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dtrmv() 2nd keyword (incx) can't be converted to int"); | |||
| 18806 | if (f2py_success) { | |||
| 18807 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","dtrmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrmv:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18808 | /* Processing variable x */ | |||
| 18809 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 18810 | ; | |||
| 18811 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 18812 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 18813 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 18814 | if (!PyErr_Occurred()) | |||
| 18815 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.dtrmv to C/Fortran array" ); | |||
| 18816 | } else { | |||
| 18817 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 18818 | ||||
| 18819 | /* Processing variable a */ | |||
| 18820 | ; | |||
| 18821 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 18822 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 18823 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 18824 | if (!PyErr_Occurred()) | |||
| 18825 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.dtrmv to C/Fortran array" ); | |||
| 18826 | } else { | |||
| 18827 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 18828 | ||||
| 18829 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 18830 | /* Processing variable offx */ | |||
| 18831 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 18832 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dtrmv() 1st keyword (offx) can't be converted to int"); | |||
| 18833 | if (f2py_success) { | |||
| 18834 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","1st keyword offx","dtrmv:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrmv:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""1st keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18835 | /* Processing variable n */ | |||
| 18836 | n = shape(a,0)a_Dims[0]; | |||
| 18837 | CHECKSCALAR(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","hidden n","dtrmv:n=%d",n)if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrmv:n=%d", "(""len(x)>offx+(n-1)*abs(incx)" ") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18838 | /*end of frompyobj*/ | |||
| 18839 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18840 | f2py_start_call_clock(); | |||
| 18841 | #endif | |||
| 18842 | /*callfortranroutine*/ | |||
| 18843 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), (diag?"U":"N"),&n,a,&n,x+offx,&incx) ; | |||
| 18844 | /*(*f2py_func)(&n,a,x,&offx,&incx,&lower,&trans,&diag);*/ | |||
| 18845 | if (PyErr_Occurred()) | |||
| 18846 | f2py_success = 0; | |||
| 18847 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18848 | f2py_stop_call_clock(); | |||
| 18849 | #endif | |||
| 18850 | /*end of callfortranroutine*/ | |||
| 18851 | if (f2py_success) { | |||
| 18852 | /*pyobjfrom*/ | |||
| 18853 | /*end of pyobjfrom*/ | |||
| 18854 | CFUNCSMESS("Building return value.\n"); | |||
| 18855 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 18856 | /*closepyobjfrom*/ | |||
| 18857 | /*end of closepyobjfrom*/ | |||
| 18858 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 18859 | /*cleanupfrompyobj*/ | |||
| 18860 | } /*CHECKSCALAR(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 18861 | /* End of cleaning variable n */ | |||
| 18862 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 18863 | } /*if (f2py_success) of offx*/ | |||
| 18864 | /* End of cleaning variable offx */ | |||
| 18865 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 18866 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 18867 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 18868 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 18869 | /* End of cleaning variable a */ | |||
| 18870 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 18871 | /* End of cleaning variable x */ | |||
| 18872 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 18873 | } /*if (f2py_success) of incx*/ | |||
| 18874 | /* End of cleaning variable incx */ | |||
| 18875 | } /*CHECKSCALAR(diag==0||diag==1)*/ | |||
| 18876 | } /*if (f2py_success) of diag*/ | |||
| 18877 | /* End of cleaning variable diag */ | |||
| 18878 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 18879 | } /*if (f2py_success) of lower*/ | |||
| 18880 | /* End of cleaning variable lower */ | |||
| 18881 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 18882 | } /*if (f2py_success) of trans*/ | |||
| 18883 | /* End of cleaning variable trans */ | |||
| 18884 | /*end of cleanupfrompyobj*/ | |||
| 18885 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 18886 | /*routdebugfailure*/ | |||
| 18887 | } else { | |||
| 18888 | /*routdebugleave*/ | |||
| 18889 | } | |||
| 18890 | CFUNCSMESS("Freeing memory.\n"); | |||
| 18891 | /*freemem*/ | |||
| 18892 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18893 | f2py_stop_clock(); | |||
| 18894 | #endif | |||
| 18895 | return capi_buildvalue; | |||
| 18896 | } | |||
| 18897 | /******************************** end of dtrmv ********************************/ | |||
| 18898 | ||||
| 18899 | /*********************************** ctrmv ***********************************/ | |||
| 18900 | static char doc_f2py_rout__fblas_ctrmv[] = "\ | |||
| 18901 | x = ctrmv(a,x,[offx,incx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ctrmv``.\ | |||
| 18902 | \n\nParameters\n----------\n" | |||
| 18903 | "a : input rank-2 array('F') with bounds (n,n)\n" | |||
| 18904 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 18905 | "\nOther Parameters\n----------------\n" | |||
| 18906 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 18907 | "offx : input int, optional\n Default: 0\n" | |||
| 18908 | "incx : input int, optional\n Default: 1\n" | |||
| 18909 | "lower : input int, optional\n Default: 0\n" | |||
| 18910 | "trans : input int, optional\n Default: 0\n" | |||
| 18911 | "diag : input int, optional\n Default: 0\n" | |||
| 18912 | "\nReturns\n-------\n" | |||
| 18913 | "x : rank-1 array('F') with bounds (*)"; | |||
| 18914 | /* extern void F_FUNC(ctrmv,CTRMV)(char*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 18915 | static PyObject *f2py_rout__fblas_ctrmv(const PyObject *capi_self, | |||
| 18916 | PyObject *capi_args, | |||
| 18917 | PyObject *capi_keywds, | |||
| 18918 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 18919 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 18920 | volatile int f2py_success = 1; | |||
| 18921 | /*decl*/ | |||
| 18922 | ||||
| 18923 | int n = 0; | |||
| 18924 | complex_float *a = NULL((void*)0); | |||
| 18925 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 18926 | const int a_Rank = 2; | |||
| 18927 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 18928 | int capi_a_intent = 0; | |||
| 18929 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 18930 | complex_float *x = NULL((void*)0); | |||
| 18931 | npy_intp x_Dims[1] = {-1}; | |||
| 18932 | const int x_Rank = 1; | |||
| 18933 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 18934 | int capi_x_intent = 0; | |||
| 18935 | int capi_overwrite_x = 0; | |||
| 18936 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 18937 | int offx = 0; | |||
| 18938 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 18939 | int incx = 0; | |||
| 18940 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 18941 | int lower = 0; | |||
| 18942 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 18943 | int trans = 0; | |||
| 18944 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 18945 | int diag = 0; | |||
| 18946 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 18947 | static char *capi_kwlist[] = {"a","x","offx","incx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 18948 | ||||
| 18949 | /*routdebugenter*/ | |||
| 18950 | #ifdef F2PY_REPORT_ATEXIT | |||
| 18951 | f2py_start_clock(); | |||
| 18952 | #endif | |||
| 18953 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 18954 | "OO|OOOOOi:_fblas.ctrmv",\ | |||
| 18955 | capi_kwlist,&a_capi,&x_capi,&offx_capi,&incx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 18956 | return NULL((void*)0); | |||
| 18957 | /*frompyobj*/ | |||
| 18958 | /* Processing variable trans */ | |||
| 18959 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 18960 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ctrmv() 4th keyword (trans) can't be converted to int"); | |||
| 18961 | if (f2py_success) { | |||
| 18962 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","4th keyword trans","ctrmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 18963 | /* Processing variable lower */ | |||
| 18964 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 18965 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctrmv() 3rd keyword (lower) can't be converted to int"); | |||
| 18966 | if (f2py_success) { | |||
| 18967 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","3rd keyword lower","ctrmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrmv:lower=%d", "(""lower==0||lower==1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18968 | /* Processing variable diag */ | |||
| 18969 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 18970 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctrmv() 5th keyword (diag) can't be converted to int"); | |||
| 18971 | if (f2py_success) { | |||
| 18972 | CHECKSCALAR(diag==0||diag==1,"diag==0||diag==1","5th keyword diag","ctrmv:diag=%d",diag)if (!(diag==0||diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrmv:diag=%d", "(""diag==0||diag==1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18973 | /* Processing variable incx */ | |||
| 18974 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 18975 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ctrmv() 2nd keyword (incx) can't be converted to int"); | |||
| 18976 | if (f2py_success) { | |||
| 18977 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","ctrmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrmv:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 18978 | /* Processing variable x */ | |||
| 18979 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 18980 | ; | |||
| 18981 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 18982 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 18983 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 18984 | if (!PyErr_Occurred()) | |||
| 18985 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.ctrmv to C/Fortran array" ); | |||
| 18986 | } else { | |||
| 18987 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 18988 | ||||
| 18989 | /* Processing variable a */ | |||
| 18990 | ; | |||
| 18991 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 18992 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 18993 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 18994 | if (!PyErr_Occurred()) | |||
| 18995 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.ctrmv to C/Fortran array" ); | |||
| 18996 | } else { | |||
| 18997 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 18998 | ||||
| 18999 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 19000 | /* Processing variable offx */ | |||
| 19001 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 19002 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ctrmv() 1st keyword (offx) can't be converted to int"); | |||
| 19003 | if (f2py_success) { | |||
| 19004 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","1st keyword offx","ctrmv:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrmv:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""1st keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19005 | /* Processing variable n */ | |||
| 19006 | n = shape(a,0)a_Dims[0]; | |||
| 19007 | CHECKSCALAR(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","hidden n","ctrmv:n=%d",n)if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrmv:n=%d", "(""len(x)>offx+(n-1)*abs(incx)" ") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19008 | /*end of frompyobj*/ | |||
| 19009 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19010 | f2py_start_call_clock(); | |||
| 19011 | #endif | |||
| 19012 | /*callfortranroutine*/ | |||
| 19013 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), (diag?"U":"N"),&n,a,&n,x+offx,&incx) ; | |||
| 19014 | /*(*f2py_func)(&n,a,x,&offx,&incx,&lower,&trans,&diag);*/ | |||
| 19015 | if (PyErr_Occurred()) | |||
| 19016 | f2py_success = 0; | |||
| 19017 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19018 | f2py_stop_call_clock(); | |||
| 19019 | #endif | |||
| 19020 | /*end of callfortranroutine*/ | |||
| 19021 | if (f2py_success) { | |||
| 19022 | /*pyobjfrom*/ | |||
| 19023 | /*end of pyobjfrom*/ | |||
| 19024 | CFUNCSMESS("Building return value.\n"); | |||
| 19025 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 19026 | /*closepyobjfrom*/ | |||
| 19027 | /*end of closepyobjfrom*/ | |||
| 19028 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 19029 | /*cleanupfrompyobj*/ | |||
| 19030 | } /*CHECKSCALAR(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 19031 | /* End of cleaning variable n */ | |||
| 19032 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 19033 | } /*if (f2py_success) of offx*/ | |||
| 19034 | /* End of cleaning variable offx */ | |||
| 19035 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 19036 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 19037 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 19038 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 19039 | /* End of cleaning variable a */ | |||
| 19040 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 19041 | /* End of cleaning variable x */ | |||
| 19042 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 19043 | } /*if (f2py_success) of incx*/ | |||
| 19044 | /* End of cleaning variable incx */ | |||
| 19045 | } /*CHECKSCALAR(diag==0||diag==1)*/ | |||
| 19046 | } /*if (f2py_success) of diag*/ | |||
| 19047 | /* End of cleaning variable diag */ | |||
| 19048 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 19049 | } /*if (f2py_success) of lower*/ | |||
| 19050 | /* End of cleaning variable lower */ | |||
| 19051 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 19052 | } /*if (f2py_success) of trans*/ | |||
| 19053 | /* End of cleaning variable trans */ | |||
| 19054 | /*end of cleanupfrompyobj*/ | |||
| 19055 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 19056 | /*routdebugfailure*/ | |||
| 19057 | } else { | |||
| 19058 | /*routdebugleave*/ | |||
| 19059 | } | |||
| 19060 | CFUNCSMESS("Freeing memory.\n"); | |||
| 19061 | /*freemem*/ | |||
| 19062 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19063 | f2py_stop_clock(); | |||
| 19064 | #endif | |||
| 19065 | return capi_buildvalue; | |||
| 19066 | } | |||
| 19067 | /******************************** end of ctrmv ********************************/ | |||
| 19068 | ||||
| 19069 | /*********************************** ztrmv ***********************************/ | |||
| 19070 | static char doc_f2py_rout__fblas_ztrmv[] = "\ | |||
| 19071 | x = ztrmv(a,x,[offx,incx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ztrmv``.\ | |||
| 19072 | \n\nParameters\n----------\n" | |||
| 19073 | "a : input rank-2 array('D') with bounds (n,n)\n" | |||
| 19074 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 19075 | "\nOther Parameters\n----------------\n" | |||
| 19076 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 19077 | "offx : input int, optional\n Default: 0\n" | |||
| 19078 | "incx : input int, optional\n Default: 1\n" | |||
| 19079 | "lower : input int, optional\n Default: 0\n" | |||
| 19080 | "trans : input int, optional\n Default: 0\n" | |||
| 19081 | "diag : input int, optional\n Default: 0\n" | |||
| 19082 | "\nReturns\n-------\n" | |||
| 19083 | "x : rank-1 array('D') with bounds (*)"; | |||
| 19084 | /* extern void F_FUNC(ztrmv,ZTRMV)(char*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 19085 | static PyObject *f2py_rout__fblas_ztrmv(const PyObject *capi_self, | |||
| 19086 | PyObject *capi_args, | |||
| 19087 | PyObject *capi_keywds, | |||
| 19088 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 19089 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 19090 | volatile int f2py_success = 1; | |||
| 19091 | /*decl*/ | |||
| 19092 | ||||
| 19093 | int n = 0; | |||
| 19094 | complex_double *a = NULL((void*)0); | |||
| 19095 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 19096 | const int a_Rank = 2; | |||
| 19097 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 19098 | int capi_a_intent = 0; | |||
| 19099 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 19100 | complex_double *x = NULL((void*)0); | |||
| 19101 | npy_intp x_Dims[1] = {-1}; | |||
| 19102 | const int x_Rank = 1; | |||
| 19103 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 19104 | int capi_x_intent = 0; | |||
| 19105 | int capi_overwrite_x = 0; | |||
| 19106 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 19107 | int offx = 0; | |||
| 19108 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 19109 | int incx = 0; | |||
| 19110 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 19111 | int lower = 0; | |||
| 19112 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 19113 | int trans = 0; | |||
| 19114 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 19115 | int diag = 0; | |||
| 19116 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 19117 | static char *capi_kwlist[] = {"a","x","offx","incx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 19118 | ||||
| 19119 | /*routdebugenter*/ | |||
| 19120 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19121 | f2py_start_clock(); | |||
| 19122 | #endif | |||
| 19123 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 19124 | "OO|OOOOOi:_fblas.ztrmv",\ | |||
| 19125 | capi_kwlist,&a_capi,&x_capi,&offx_capi,&incx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 19126 | return NULL((void*)0); | |||
| 19127 | /*frompyobj*/ | |||
| 19128 | /* Processing variable trans */ | |||
| 19129 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 19130 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ztrmv() 4th keyword (trans) can't be converted to int"); | |||
| 19131 | if (f2py_success) { | |||
| 19132 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","4th keyword trans","ztrmv:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrmv:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19133 | /* Processing variable lower */ | |||
| 19134 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 19135 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztrmv() 3rd keyword (lower) can't be converted to int"); | |||
| 19136 | if (f2py_success) { | |||
| 19137 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","3rd keyword lower","ztrmv:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrmv:lower=%d", "(""lower==0||lower==1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19138 | /* Processing variable diag */ | |||
| 19139 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 19140 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztrmv() 5th keyword (diag) can't be converted to int"); | |||
| 19141 | if (f2py_success) { | |||
| 19142 | CHECKSCALAR(diag==0||diag==1,"diag==0||diag==1","5th keyword diag","ztrmv:diag=%d",diag)if (!(diag==0||diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrmv:diag=%d", "(""diag==0||diag==1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19143 | /* Processing variable incx */ | |||
| 19144 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 19145 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ztrmv() 2nd keyword (incx) can't be converted to int"); | |||
| 19146 | if (f2py_success) { | |||
| 19147 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","2nd keyword incx","ztrmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrmv:incx=%d", "(""incx>0||incx<0"") failed for " "2nd keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19148 | /* Processing variable x */ | |||
| 19149 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 19150 | ; | |||
| 19151 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 19152 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 19153 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 19154 | if (!PyErr_Occurred()) | |||
| 19155 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.ztrmv to C/Fortran array" ); | |||
| 19156 | } else { | |||
| 19157 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 19158 | ||||
| 19159 | /* Processing variable a */ | |||
| 19160 | ; | |||
| 19161 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 19162 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 19163 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 19164 | if (!PyErr_Occurred()) | |||
| 19165 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.ztrmv to C/Fortran array" ); | |||
| 19166 | } else { | |||
| 19167 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 19168 | ||||
| 19169 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 19170 | /* Processing variable offx */ | |||
| 19171 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 19172 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ztrmv() 1st keyword (offx) can't be converted to int"); | |||
| 19173 | if (f2py_success) { | |||
| 19174 | CHECKSCALAR(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","1st keyword offx","ztrmv:offx=%d",offx)if (!(offx>=0 && offx<x_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrmv:offx=%d", "(""offx>=0 && offx<len(x)" ") failed for ""1st keyword offx", offx); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19175 | /* Processing variable n */ | |||
| 19176 | n = shape(a,0)a_Dims[0]; | |||
| 19177 | CHECKSCALAR(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","hidden n","ztrmv:n=%d",n)if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { char errstring[256 ]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrmv:n=%d", "(""len(x)>offx+(n-1)*abs(incx)" ") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19178 | /*end of frompyobj*/ | |||
| 19179 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19180 | f2py_start_call_clock(); | |||
| 19181 | #endif | |||
| 19182 | /*callfortranroutine*/ | |||
| 19183 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), (diag?"U":"N"),&n,a,&n,x+offx,&incx) ; | |||
| 19184 | /*(*f2py_func)(&n,a,x,&offx,&incx,&lower,&trans,&diag);*/ | |||
| 19185 | if (PyErr_Occurred()) | |||
| 19186 | f2py_success = 0; | |||
| 19187 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19188 | f2py_stop_call_clock(); | |||
| 19189 | #endif | |||
| 19190 | /*end of callfortranroutine*/ | |||
| 19191 | if (f2py_success) { | |||
| 19192 | /*pyobjfrom*/ | |||
| 19193 | /*end of pyobjfrom*/ | |||
| 19194 | CFUNCSMESS("Building return value.\n"); | |||
| 19195 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 19196 | /*closepyobjfrom*/ | |||
| 19197 | /*end of closepyobjfrom*/ | |||
| 19198 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 19199 | /*cleanupfrompyobj*/ | |||
| 19200 | } /*CHECKSCALAR(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 19201 | /* End of cleaning variable n */ | |||
| 19202 | } /*CHECKSCALAR(offx>=0 && offx<len(x))*/ | |||
| 19203 | } /*if (f2py_success) of offx*/ | |||
| 19204 | /* End of cleaning variable offx */ | |||
| 19205 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 19206 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 19207 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 19208 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 19209 | /* End of cleaning variable a */ | |||
| 19210 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 19211 | /* End of cleaning variable x */ | |||
| 19212 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 19213 | } /*if (f2py_success) of incx*/ | |||
| 19214 | /* End of cleaning variable incx */ | |||
| 19215 | } /*CHECKSCALAR(diag==0||diag==1)*/ | |||
| 19216 | } /*if (f2py_success) of diag*/ | |||
| 19217 | /* End of cleaning variable diag */ | |||
| 19218 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 19219 | } /*if (f2py_success) of lower*/ | |||
| 19220 | /* End of cleaning variable lower */ | |||
| 19221 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 19222 | } /*if (f2py_success) of trans*/ | |||
| 19223 | /* End of cleaning variable trans */ | |||
| 19224 | /*end of cleanupfrompyobj*/ | |||
| 19225 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 19226 | /*routdebugfailure*/ | |||
| 19227 | } else { | |||
| 19228 | /*routdebugleave*/ | |||
| 19229 | } | |||
| 19230 | CFUNCSMESS("Freeing memory.\n"); | |||
| 19231 | /*freemem*/ | |||
| 19232 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19233 | f2py_stop_clock(); | |||
| 19234 | #endif | |||
| 19235 | return capi_buildvalue; | |||
| 19236 | } | |||
| 19237 | /******************************** end of ztrmv ********************************/ | |||
| 19238 | ||||
| 19239 | /*********************************** strsv ***********************************/ | |||
| 19240 | static char doc_f2py_rout__fblas_strsv[] = "\ | |||
| 19241 | xout = strsv(a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``strsv``.\ | |||
| 19242 | \n\nParameters\n----------\n" | |||
| 19243 | "a : input rank-2 array('f') with bounds (n,n)\n" | |||
| 19244 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 19245 | "\nOther Parameters\n----------------\n" | |||
| 19246 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 19247 | "incx : input int, optional\n Default: 1\n" | |||
| 19248 | "offx : input int, optional\n Default: 0\n" | |||
| 19249 | "lower : input int, optional\n Default: 0\n" | |||
| 19250 | "trans : input int, optional\n Default: 0\n" | |||
| 19251 | "diag : input int, optional\n Default: 0\n" | |||
| 19252 | "\nReturns\n-------\n" | |||
| 19253 | "xout : rank-1 array('f') with bounds (*) and x storage"; | |||
| 19254 | /* extern void F_FUNC(strsv,STRSV)(char*,char*,char*,F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 19255 | static PyObject *f2py_rout__fblas_strsv(const PyObject *capi_self, | |||
| 19256 | PyObject *capi_args, | |||
| 19257 | PyObject *capi_keywds, | |||
| 19258 | void (*f2py_func)(char*,char*,char*,F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 19259 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 19260 | volatile int f2py_success = 1; | |||
| 19261 | /*decl*/ | |||
| 19262 | ||||
| 19263 | int n = 0; | |||
| 19264 | float *a = NULL((void*)0); | |||
| 19265 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 19266 | const int a_Rank = 2; | |||
| 19267 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 19268 | int capi_a_intent = 0; | |||
| 19269 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 19270 | int lda = 0; | |||
| 19271 | float *x = NULL((void*)0); | |||
| 19272 | npy_intp x_Dims[1] = {-1}; | |||
| 19273 | const int x_Rank = 1; | |||
| 19274 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 19275 | int capi_x_intent = 0; | |||
| 19276 | int capi_overwrite_x = 0; | |||
| 19277 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 19278 | int incx = 0; | |||
| 19279 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 19280 | int offx = 0; | |||
| 19281 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 19282 | int lower = 0; | |||
| 19283 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 19284 | int trans = 0; | |||
| 19285 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 19286 | int diag = 0; | |||
| 19287 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 19288 | static char *capi_kwlist[] = {"a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 19289 | ||||
| 19290 | /*routdebugenter*/ | |||
| 19291 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19292 | f2py_start_clock(); | |||
| 19293 | #endif | |||
| 19294 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 19295 | "OO|OOOOOi:_fblas.strsv",\ | |||
| 19296 | capi_kwlist,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 19297 | return NULL((void*)0); | |||
| 19298 | /*frompyobj*/ | |||
| 19299 | /* Processing variable lower */ | |||
| 19300 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 19301 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.strsv() 3rd keyword (lower) can't be converted to int"); | |||
| 19302 | if (f2py_success) { | |||
| 19303 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","strsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19304 | /* Processing variable trans */ | |||
| 19305 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 19306 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.strsv() 4th keyword (trans) can't be converted to int"); | |||
| 19307 | if (f2py_success) { | |||
| 19308 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","strsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19309 | /* Processing variable diag */ | |||
| 19310 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 19311 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.strsv() 5th keyword (diag) can't be converted to int"); | |||
| 19312 | if (f2py_success) { | |||
| 19313 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","strsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19314 | /* Processing variable incx */ | |||
| 19315 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 19316 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.strsv() 1st keyword (incx) can't be converted to int"); | |||
| 19317 | if (f2py_success) { | |||
| 19318 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","strsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19319 | /* Processing variable offx */ | |||
| 19320 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 19321 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.strsv() 2nd keyword (offx) can't be converted to int"); | |||
| 19322 | if (f2py_success) { | |||
| 19323 | /* Processing variable a */ | |||
| 19324 | ; | |||
| 19325 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 19326 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 19327 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 19328 | if (!PyErr_Occurred()) | |||
| 19329 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.strsv to C/Fortran array" ); | |||
| 19330 | } else { | |||
| 19331 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 19332 | ||||
| 19333 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 19334 | /* Processing variable n */ | |||
| 19335 | n = shape(a,0)a_Dims[0]; | |||
| 19336 | CHECKSCALAR(n>=0,"n>=0","hidden n","strsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 19337 | /* Processing variable lda */ | |||
| 19338 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 19339 | /* Processing variable x */ | |||
| 19340 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 19341 | ; | |||
| 19342 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 19343 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 19344 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 19345 | if (!PyErr_Occurred()) | |||
| 19346 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.strsv to C/Fortran array" ); | |||
| 19347 | } else { | |||
| 19348 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 19349 | ||||
| 19350 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","2nd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""2nd argument x" ); } else { | |||
| 19351 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "2nd argument x"); } else { | |||
| 19352 | /*end of frompyobj*/ | |||
| 19353 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19354 | f2py_start_call_clock(); | |||
| 19355 | #endif | |||
| 19356 | /*callfortranroutine*/ | |||
| 19357 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,a,&lda,x+offx,&incx) ; | |||
| 19358 | /*(*f2py_func)(&n,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 19359 | if (PyErr_Occurred()) | |||
| 19360 | f2py_success = 0; | |||
| 19361 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19362 | f2py_stop_call_clock(); | |||
| 19363 | #endif | |||
| 19364 | /*end of callfortranroutine*/ | |||
| 19365 | if (f2py_success) { | |||
| 19366 | /*pyobjfrom*/ | |||
| 19367 | /*end of pyobjfrom*/ | |||
| 19368 | CFUNCSMESS("Building return value.\n"); | |||
| 19369 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 19370 | /*closepyobjfrom*/ | |||
| 19371 | /*end of closepyobjfrom*/ | |||
| 19372 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 19373 | /*cleanupfrompyobj*/ | |||
| 19374 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 19375 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 19376 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 19377 | /* End of cleaning variable x */ | |||
| 19378 | /* End of cleaning variable lda */ | |||
| 19379 | } /*CHECKSCALAR(n>=0)*/ | |||
| 19380 | /* End of cleaning variable n */ | |||
| 19381 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 19382 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 19383 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 19384 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 19385 | /* End of cleaning variable a */ | |||
| 19386 | } /*if (f2py_success) of offx*/ | |||
| 19387 | /* End of cleaning variable offx */ | |||
| 19388 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 19389 | } /*if (f2py_success) of incx*/ | |||
| 19390 | /* End of cleaning variable incx */ | |||
| 19391 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 19392 | } /*if (f2py_success) of diag*/ | |||
| 19393 | /* End of cleaning variable diag */ | |||
| 19394 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 19395 | } /*if (f2py_success) of trans*/ | |||
| 19396 | /* End of cleaning variable trans */ | |||
| 19397 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 19398 | } /*if (f2py_success) of lower*/ | |||
| 19399 | /* End of cleaning variable lower */ | |||
| 19400 | /*end of cleanupfrompyobj*/ | |||
| 19401 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 19402 | /*routdebugfailure*/ | |||
| 19403 | } else { | |||
| 19404 | /*routdebugleave*/ | |||
| 19405 | } | |||
| 19406 | CFUNCSMESS("Freeing memory.\n"); | |||
| 19407 | /*freemem*/ | |||
| 19408 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19409 | f2py_stop_clock(); | |||
| 19410 | #endif | |||
| 19411 | return capi_buildvalue; | |||
| 19412 | } | |||
| 19413 | /******************************** end of strsv ********************************/ | |||
| 19414 | ||||
| 19415 | /*********************************** dtrsv ***********************************/ | |||
| 19416 | static char doc_f2py_rout__fblas_dtrsv[] = "\ | |||
| 19417 | xout = dtrsv(a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``dtrsv``.\ | |||
| 19418 | \n\nParameters\n----------\n" | |||
| 19419 | "a : input rank-2 array('d') with bounds (n,n)\n" | |||
| 19420 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 19421 | "\nOther Parameters\n----------------\n" | |||
| 19422 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 19423 | "incx : input int, optional\n Default: 1\n" | |||
| 19424 | "offx : input int, optional\n Default: 0\n" | |||
| 19425 | "lower : input int, optional\n Default: 0\n" | |||
| 19426 | "trans : input int, optional\n Default: 0\n" | |||
| 19427 | "diag : input int, optional\n Default: 0\n" | |||
| 19428 | "\nReturns\n-------\n" | |||
| 19429 | "xout : rank-1 array('d') with bounds (*) and x storage"; | |||
| 19430 | /* extern void F_FUNC(dtrsv,DTRSV)(char*,char*,char*,F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 19431 | static PyObject *f2py_rout__fblas_dtrsv(const PyObject *capi_self, | |||
| 19432 | PyObject *capi_args, | |||
| 19433 | PyObject *capi_keywds, | |||
| 19434 | void (*f2py_func)(char*,char*,char*,F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 19435 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 19436 | volatile int f2py_success = 1; | |||
| 19437 | /*decl*/ | |||
| 19438 | ||||
| 19439 | int n = 0; | |||
| 19440 | double *a = NULL((void*)0); | |||
| 19441 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 19442 | const int a_Rank = 2; | |||
| 19443 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 19444 | int capi_a_intent = 0; | |||
| 19445 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 19446 | int lda = 0; | |||
| 19447 | double *x = NULL((void*)0); | |||
| 19448 | npy_intp x_Dims[1] = {-1}; | |||
| 19449 | const int x_Rank = 1; | |||
| 19450 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 19451 | int capi_x_intent = 0; | |||
| 19452 | int capi_overwrite_x = 0; | |||
| 19453 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 19454 | int incx = 0; | |||
| 19455 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 19456 | int offx = 0; | |||
| 19457 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 19458 | int lower = 0; | |||
| 19459 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 19460 | int trans = 0; | |||
| 19461 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 19462 | int diag = 0; | |||
| 19463 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 19464 | static char *capi_kwlist[] = {"a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 19465 | ||||
| 19466 | /*routdebugenter*/ | |||
| 19467 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19468 | f2py_start_clock(); | |||
| 19469 | #endif | |||
| 19470 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 19471 | "OO|OOOOOi:_fblas.dtrsv",\ | |||
| 19472 | capi_kwlist,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 19473 | return NULL((void*)0); | |||
| 19474 | /*frompyobj*/ | |||
| 19475 | /* Processing variable lower */ | |||
| 19476 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 19477 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtrsv() 3rd keyword (lower) can't be converted to int"); | |||
| 19478 | if (f2py_success) { | |||
| 19479 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","dtrsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19480 | /* Processing variable trans */ | |||
| 19481 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 19482 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dtrsv() 4th keyword (trans) can't be converted to int"); | |||
| 19483 | if (f2py_success) { | |||
| 19484 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","dtrsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19485 | /* Processing variable diag */ | |||
| 19486 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 19487 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtrsv() 5th keyword (diag) can't be converted to int"); | |||
| 19488 | if (f2py_success) { | |||
| 19489 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","dtrsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19490 | /* Processing variable incx */ | |||
| 19491 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 19492 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dtrsv() 1st keyword (incx) can't be converted to int"); | |||
| 19493 | if (f2py_success) { | |||
| 19494 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dtrsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19495 | /* Processing variable offx */ | |||
| 19496 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 19497 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dtrsv() 2nd keyword (offx) can't be converted to int"); | |||
| 19498 | if (f2py_success) { | |||
| 19499 | /* Processing variable a */ | |||
| 19500 | ; | |||
| 19501 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 19502 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 19503 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 19504 | if (!PyErr_Occurred()) | |||
| 19505 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.dtrsv to C/Fortran array" ); | |||
| 19506 | } else { | |||
| 19507 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 19508 | ||||
| 19509 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 19510 | /* Processing variable n */ | |||
| 19511 | n = shape(a,0)a_Dims[0]; | |||
| 19512 | CHECKSCALAR(n>=0,"n>=0","hidden n","dtrsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 19513 | /* Processing variable lda */ | |||
| 19514 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 19515 | /* Processing variable x */ | |||
| 19516 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 19517 | ; | |||
| 19518 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 19519 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 19520 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 19521 | if (!PyErr_Occurred()) | |||
| 19522 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.dtrsv to C/Fortran array" ); | |||
| 19523 | } else { | |||
| 19524 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 19525 | ||||
| 19526 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","2nd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""2nd argument x" ); } else { | |||
| 19527 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "2nd argument x"); } else { | |||
| 19528 | /*end of frompyobj*/ | |||
| 19529 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19530 | f2py_start_call_clock(); | |||
| 19531 | #endif | |||
| 19532 | /*callfortranroutine*/ | |||
| 19533 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,a,&lda,x+offx,&incx) ; | |||
| 19534 | /*(*f2py_func)(&n,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 19535 | if (PyErr_Occurred()) | |||
| 19536 | f2py_success = 0; | |||
| 19537 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19538 | f2py_stop_call_clock(); | |||
| 19539 | #endif | |||
| 19540 | /*end of callfortranroutine*/ | |||
| 19541 | if (f2py_success) { | |||
| 19542 | /*pyobjfrom*/ | |||
| 19543 | /*end of pyobjfrom*/ | |||
| 19544 | CFUNCSMESS("Building return value.\n"); | |||
| 19545 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 19546 | /*closepyobjfrom*/ | |||
| 19547 | /*end of closepyobjfrom*/ | |||
| 19548 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 19549 | /*cleanupfrompyobj*/ | |||
| 19550 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 19551 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 19552 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 19553 | /* End of cleaning variable x */ | |||
| 19554 | /* End of cleaning variable lda */ | |||
| 19555 | } /*CHECKSCALAR(n>=0)*/ | |||
| 19556 | /* End of cleaning variable n */ | |||
| 19557 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 19558 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 19559 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 19560 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 19561 | /* End of cleaning variable a */ | |||
| 19562 | } /*if (f2py_success) of offx*/ | |||
| 19563 | /* End of cleaning variable offx */ | |||
| 19564 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 19565 | } /*if (f2py_success) of incx*/ | |||
| 19566 | /* End of cleaning variable incx */ | |||
| 19567 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 19568 | } /*if (f2py_success) of diag*/ | |||
| 19569 | /* End of cleaning variable diag */ | |||
| 19570 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 19571 | } /*if (f2py_success) of trans*/ | |||
| 19572 | /* End of cleaning variable trans */ | |||
| 19573 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 19574 | } /*if (f2py_success) of lower*/ | |||
| 19575 | /* End of cleaning variable lower */ | |||
| 19576 | /*end of cleanupfrompyobj*/ | |||
| 19577 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 19578 | /*routdebugfailure*/ | |||
| 19579 | } else { | |||
| 19580 | /*routdebugleave*/ | |||
| 19581 | } | |||
| 19582 | CFUNCSMESS("Freeing memory.\n"); | |||
| 19583 | /*freemem*/ | |||
| 19584 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19585 | f2py_stop_clock(); | |||
| 19586 | #endif | |||
| 19587 | return capi_buildvalue; | |||
| 19588 | } | |||
| 19589 | /******************************** end of dtrsv ********************************/ | |||
| 19590 | ||||
| 19591 | /*********************************** ctrsv ***********************************/ | |||
| 19592 | static char doc_f2py_rout__fblas_ctrsv[] = "\ | |||
| 19593 | xout = ctrsv(a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ctrsv``.\ | |||
| 19594 | \n\nParameters\n----------\n" | |||
| 19595 | "a : input rank-2 array('F') with bounds (n,n)\n" | |||
| 19596 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 19597 | "\nOther Parameters\n----------------\n" | |||
| 19598 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 19599 | "incx : input int, optional\n Default: 1\n" | |||
| 19600 | "offx : input int, optional\n Default: 0\n" | |||
| 19601 | "lower : input int, optional\n Default: 0\n" | |||
| 19602 | "trans : input int, optional\n Default: 0\n" | |||
| 19603 | "diag : input int, optional\n Default: 0\n" | |||
| 19604 | "\nReturns\n-------\n" | |||
| 19605 | "xout : rank-1 array('F') with bounds (*) and x storage"; | |||
| 19606 | /* extern void F_FUNC(ctrsv,CTRSV)(char*,char*,char*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 19607 | static PyObject *f2py_rout__fblas_ctrsv(const PyObject *capi_self, | |||
| 19608 | PyObject *capi_args, | |||
| 19609 | PyObject *capi_keywds, | |||
| 19610 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 19611 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 19612 | volatile int f2py_success = 1; | |||
| 19613 | /*decl*/ | |||
| 19614 | ||||
| 19615 | int n = 0; | |||
| 19616 | complex_float *a = NULL((void*)0); | |||
| 19617 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 19618 | const int a_Rank = 2; | |||
| 19619 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 19620 | int capi_a_intent = 0; | |||
| 19621 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 19622 | int lda = 0; | |||
| 19623 | complex_float *x = NULL((void*)0); | |||
| 19624 | npy_intp x_Dims[1] = {-1}; | |||
| 19625 | const int x_Rank = 1; | |||
| 19626 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 19627 | int capi_x_intent = 0; | |||
| 19628 | int capi_overwrite_x = 0; | |||
| 19629 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 19630 | int incx = 0; | |||
| 19631 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 19632 | int offx = 0; | |||
| 19633 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 19634 | int lower = 0; | |||
| 19635 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 19636 | int trans = 0; | |||
| 19637 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 19638 | int diag = 0; | |||
| 19639 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 19640 | static char *capi_kwlist[] = {"a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 19641 | ||||
| 19642 | /*routdebugenter*/ | |||
| 19643 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19644 | f2py_start_clock(); | |||
| 19645 | #endif | |||
| 19646 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 19647 | "OO|OOOOOi:_fblas.ctrsv",\ | |||
| 19648 | capi_kwlist,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 19649 | return NULL((void*)0); | |||
| 19650 | /*frompyobj*/ | |||
| 19651 | /* Processing variable lower */ | |||
| 19652 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 19653 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctrsv() 3rd keyword (lower) can't be converted to int"); | |||
| 19654 | if (f2py_success) { | |||
| 19655 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ctrsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19656 | /* Processing variable trans */ | |||
| 19657 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 19658 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ctrsv() 4th keyword (trans) can't be converted to int"); | |||
| 19659 | if (f2py_success) { | |||
| 19660 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ctrsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19661 | /* Processing variable diag */ | |||
| 19662 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 19663 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctrsv() 5th keyword (diag) can't be converted to int"); | |||
| 19664 | if (f2py_success) { | |||
| 19665 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ctrsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19666 | /* Processing variable incx */ | |||
| 19667 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 19668 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ctrsv() 1st keyword (incx) can't be converted to int"); | |||
| 19669 | if (f2py_success) { | |||
| 19670 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ctrsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19671 | /* Processing variable offx */ | |||
| 19672 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 19673 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ctrsv() 2nd keyword (offx) can't be converted to int"); | |||
| 19674 | if (f2py_success) { | |||
| 19675 | /* Processing variable a */ | |||
| 19676 | ; | |||
| 19677 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 19678 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 19679 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 19680 | if (!PyErr_Occurred()) | |||
| 19681 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.ctrsv to C/Fortran array" ); | |||
| 19682 | } else { | |||
| 19683 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 19684 | ||||
| 19685 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 19686 | /* Processing variable n */ | |||
| 19687 | n = shape(a,0)a_Dims[0]; | |||
| 19688 | CHECKSCALAR(n>=0,"n>=0","hidden n","ctrsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 19689 | /* Processing variable lda */ | |||
| 19690 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 19691 | /* Processing variable x */ | |||
| 19692 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 19693 | ; | |||
| 19694 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 19695 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 19696 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 19697 | if (!PyErr_Occurred()) | |||
| 19698 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.ctrsv to C/Fortran array" ); | |||
| 19699 | } else { | |||
| 19700 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 19701 | ||||
| 19702 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","2nd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""2nd argument x" ); } else { | |||
| 19703 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "2nd argument x"); } else { | |||
| 19704 | /*end of frompyobj*/ | |||
| 19705 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19706 | f2py_start_call_clock(); | |||
| 19707 | #endif | |||
| 19708 | /*callfortranroutine*/ | |||
| 19709 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,a,&lda,x+offx,&incx) ; | |||
| 19710 | /*(*f2py_func)(&n,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 19711 | if (PyErr_Occurred()) | |||
| 19712 | f2py_success = 0; | |||
| 19713 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19714 | f2py_stop_call_clock(); | |||
| 19715 | #endif | |||
| 19716 | /*end of callfortranroutine*/ | |||
| 19717 | if (f2py_success) { | |||
| 19718 | /*pyobjfrom*/ | |||
| 19719 | /*end of pyobjfrom*/ | |||
| 19720 | CFUNCSMESS("Building return value.\n"); | |||
| 19721 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 19722 | /*closepyobjfrom*/ | |||
| 19723 | /*end of closepyobjfrom*/ | |||
| 19724 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 19725 | /*cleanupfrompyobj*/ | |||
| 19726 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 19727 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 19728 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 19729 | /* End of cleaning variable x */ | |||
| 19730 | /* End of cleaning variable lda */ | |||
| 19731 | } /*CHECKSCALAR(n>=0)*/ | |||
| 19732 | /* End of cleaning variable n */ | |||
| 19733 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 19734 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 19735 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 19736 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 19737 | /* End of cleaning variable a */ | |||
| 19738 | } /*if (f2py_success) of offx*/ | |||
| 19739 | /* End of cleaning variable offx */ | |||
| 19740 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 19741 | } /*if (f2py_success) of incx*/ | |||
| 19742 | /* End of cleaning variable incx */ | |||
| 19743 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 19744 | } /*if (f2py_success) of diag*/ | |||
| 19745 | /* End of cleaning variable diag */ | |||
| 19746 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 19747 | } /*if (f2py_success) of trans*/ | |||
| 19748 | /* End of cleaning variable trans */ | |||
| 19749 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 19750 | } /*if (f2py_success) of lower*/ | |||
| 19751 | /* End of cleaning variable lower */ | |||
| 19752 | /*end of cleanupfrompyobj*/ | |||
| 19753 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 19754 | /*routdebugfailure*/ | |||
| 19755 | } else { | |||
| 19756 | /*routdebugleave*/ | |||
| 19757 | } | |||
| 19758 | CFUNCSMESS("Freeing memory.\n"); | |||
| 19759 | /*freemem*/ | |||
| 19760 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19761 | f2py_stop_clock(); | |||
| 19762 | #endif | |||
| 19763 | return capi_buildvalue; | |||
| 19764 | } | |||
| 19765 | /******************************** end of ctrsv ********************************/ | |||
| 19766 | ||||
| 19767 | /*********************************** ztrsv ***********************************/ | |||
| 19768 | static char doc_f2py_rout__fblas_ztrsv[] = "\ | |||
| 19769 | xout = ztrsv(a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ztrsv``.\ | |||
| 19770 | \n\nParameters\n----------\n" | |||
| 19771 | "a : input rank-2 array('D') with bounds (n,n)\n" | |||
| 19772 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 19773 | "\nOther Parameters\n----------------\n" | |||
| 19774 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 19775 | "incx : input int, optional\n Default: 1\n" | |||
| 19776 | "offx : input int, optional\n Default: 0\n" | |||
| 19777 | "lower : input int, optional\n Default: 0\n" | |||
| 19778 | "trans : input int, optional\n Default: 0\n" | |||
| 19779 | "diag : input int, optional\n Default: 0\n" | |||
| 19780 | "\nReturns\n-------\n" | |||
| 19781 | "xout : rank-1 array('D') with bounds (*) and x storage"; | |||
| 19782 | /* extern void F_FUNC(ztrsv,ZTRSV)(char*,char*,char*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 19783 | static PyObject *f2py_rout__fblas_ztrsv(const PyObject *capi_self, | |||
| 19784 | PyObject *capi_args, | |||
| 19785 | PyObject *capi_keywds, | |||
| 19786 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 19787 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 19788 | volatile int f2py_success = 1; | |||
| 19789 | /*decl*/ | |||
| 19790 | ||||
| 19791 | int n = 0; | |||
| 19792 | complex_double *a = NULL((void*)0); | |||
| 19793 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 19794 | const int a_Rank = 2; | |||
| 19795 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 19796 | int capi_a_intent = 0; | |||
| 19797 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 19798 | int lda = 0; | |||
| 19799 | complex_double *x = NULL((void*)0); | |||
| 19800 | npy_intp x_Dims[1] = {-1}; | |||
| 19801 | const int x_Rank = 1; | |||
| 19802 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 19803 | int capi_x_intent = 0; | |||
| 19804 | int capi_overwrite_x = 0; | |||
| 19805 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 19806 | int incx = 0; | |||
| 19807 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 19808 | int offx = 0; | |||
| 19809 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 19810 | int lower = 0; | |||
| 19811 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 19812 | int trans = 0; | |||
| 19813 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 19814 | int diag = 0; | |||
| 19815 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 19816 | static char *capi_kwlist[] = {"a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 19817 | ||||
| 19818 | /*routdebugenter*/ | |||
| 19819 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19820 | f2py_start_clock(); | |||
| 19821 | #endif | |||
| 19822 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 19823 | "OO|OOOOOi:_fblas.ztrsv",\ | |||
| 19824 | capi_kwlist,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 19825 | return NULL((void*)0); | |||
| 19826 | /*frompyobj*/ | |||
| 19827 | /* Processing variable lower */ | |||
| 19828 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 19829 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztrsv() 3rd keyword (lower) can't be converted to int"); | |||
| 19830 | if (f2py_success) { | |||
| 19831 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ztrsv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19832 | /* Processing variable trans */ | |||
| 19833 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 19834 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ztrsv() 4th keyword (trans) can't be converted to int"); | |||
| 19835 | if (f2py_success) { | |||
| 19836 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ztrsv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrsv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 19837 | /* Processing variable diag */ | |||
| 19838 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 19839 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztrsv() 5th keyword (diag) can't be converted to int"); | |||
| 19840 | if (f2py_success) { | |||
| 19841 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ztrsv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19842 | /* Processing variable incx */ | |||
| 19843 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 19844 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ztrsv() 1st keyword (incx) can't be converted to int"); | |||
| 19845 | if (f2py_success) { | |||
| 19846 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ztrsv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 19847 | /* Processing variable offx */ | |||
| 19848 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 19849 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ztrsv() 2nd keyword (offx) can't be converted to int"); | |||
| 19850 | if (f2py_success) { | |||
| 19851 | /* Processing variable a */ | |||
| 19852 | ; | |||
| 19853 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 19854 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 19855 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 19856 | if (!PyErr_Occurred()) | |||
| 19857 | PyErr_SetString(_fblas_error,"failed in converting 1st argument `a' of _fblas.ztrsv to C/Fortran array" ); | |||
| 19858 | } else { | |||
| 19859 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 19860 | ||||
| 19861 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","1st argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""1st argument a"); } else { | |||
| 19862 | /* Processing variable n */ | |||
| 19863 | n = shape(a,0)a_Dims[0]; | |||
| 19864 | CHECKSCALAR(n>=0,"n>=0","hidden n","ztrsv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 19865 | /* Processing variable lda */ | |||
| 19866 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 19867 | /* Processing variable x */ | |||
| 19868 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 19869 | ; | |||
| 19870 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 19871 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 19872 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 19873 | if (!PyErr_Occurred()) | |||
| 19874 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `x' of _fblas.ztrsv to C/Fortran array" ); | |||
| 19875 | } else { | |||
| 19876 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 19877 | ||||
| 19878 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","2nd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""2nd argument x" ); } else { | |||
| 19879 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","2nd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "2nd argument x"); } else { | |||
| 19880 | /*end of frompyobj*/ | |||
| 19881 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19882 | f2py_start_call_clock(); | |||
| 19883 | #endif | |||
| 19884 | /*callfortranroutine*/ | |||
| 19885 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,a,&lda,x+offx,&incx) ; | |||
| 19886 | /*(*f2py_func)(&n,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 19887 | if (PyErr_Occurred()) | |||
| 19888 | f2py_success = 0; | |||
| 19889 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19890 | f2py_stop_call_clock(); | |||
| 19891 | #endif | |||
| 19892 | /*end of callfortranroutine*/ | |||
| 19893 | if (f2py_success) { | |||
| 19894 | /*pyobjfrom*/ | |||
| 19895 | /*end of pyobjfrom*/ | |||
| 19896 | CFUNCSMESS("Building return value.\n"); | |||
| 19897 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 19898 | /*closepyobjfrom*/ | |||
| 19899 | /*end of closepyobjfrom*/ | |||
| 19900 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 19901 | /*cleanupfrompyobj*/ | |||
| 19902 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 19903 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 19904 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 19905 | /* End of cleaning variable x */ | |||
| 19906 | /* End of cleaning variable lda */ | |||
| 19907 | } /*CHECKSCALAR(n>=0)*/ | |||
| 19908 | /* End of cleaning variable n */ | |||
| 19909 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 19910 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 19911 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 19912 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 19913 | /* End of cleaning variable a */ | |||
| 19914 | } /*if (f2py_success) of offx*/ | |||
| 19915 | /* End of cleaning variable offx */ | |||
| 19916 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 19917 | } /*if (f2py_success) of incx*/ | |||
| 19918 | /* End of cleaning variable incx */ | |||
| 19919 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 19920 | } /*if (f2py_success) of diag*/ | |||
| 19921 | /* End of cleaning variable diag */ | |||
| 19922 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 19923 | } /*if (f2py_success) of trans*/ | |||
| 19924 | /* End of cleaning variable trans */ | |||
| 19925 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 19926 | } /*if (f2py_success) of lower*/ | |||
| 19927 | /* End of cleaning variable lower */ | |||
| 19928 | /*end of cleanupfrompyobj*/ | |||
| 19929 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 19930 | /*routdebugfailure*/ | |||
| 19931 | } else { | |||
| 19932 | /*routdebugleave*/ | |||
| 19933 | } | |||
| 19934 | CFUNCSMESS("Freeing memory.\n"); | |||
| 19935 | /*freemem*/ | |||
| 19936 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19937 | f2py_stop_clock(); | |||
| 19938 | #endif | |||
| 19939 | return capi_buildvalue; | |||
| 19940 | } | |||
| 19941 | /******************************** end of ztrsv ********************************/ | |||
| 19942 | ||||
| 19943 | /*********************************** stbmv ***********************************/ | |||
| 19944 | static char doc_f2py_rout__fblas_stbmv[] = "\ | |||
| 19945 | xout = stbmv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``stbmv``.\ | |||
| 19946 | \n\nParameters\n----------\n" | |||
| 19947 | "k : input int\n" | |||
| 19948 | "a : input rank-2 array('f') with bounds (lda,n)\n" | |||
| 19949 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 19950 | "\nOther Parameters\n----------------\n" | |||
| 19951 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 19952 | "incx : input int, optional\n Default: 1\n" | |||
| 19953 | "offx : input int, optional\n Default: 0\n" | |||
| 19954 | "lower : input int, optional\n Default: 0\n" | |||
| 19955 | "trans : input int, optional\n Default: 0\n" | |||
| 19956 | "diag : input int, optional\n Default: 0\n" | |||
| 19957 | "\nReturns\n-------\n" | |||
| 19958 | "xout : rank-1 array('f') with bounds (*) and x storage"; | |||
| 19959 | /* extern void F_FUNC(stbmv,STBMV)(char*,char*,char*,F_INT*,F_INT*,float*,F_INT*,float*,F_INT* ); */ | |||
| 19960 | static PyObject *f2py_rout__fblas_stbmv(const PyObject *capi_self, | |||
| 19961 | PyObject *capi_args, | |||
| 19962 | PyObject *capi_keywds, | |||
| 19963 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,float*,F_INTint*,float*,F_INTint* )) { | |||
| 19964 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 19965 | volatile int f2py_success = 1; | |||
| 19966 | /*decl*/ | |||
| 19967 | ||||
| 19968 | int n = 0; | |||
| 19969 | int k = 0; | |||
| 19970 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 19971 | float *a = NULL((void*)0); | |||
| 19972 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 19973 | const int a_Rank = 2; | |||
| 19974 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 19975 | int capi_a_intent = 0; | |||
| 19976 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 19977 | int lda = 0; | |||
| 19978 | float *x = NULL((void*)0); | |||
| 19979 | npy_intp x_Dims[1] = {-1}; | |||
| 19980 | const int x_Rank = 1; | |||
| 19981 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 19982 | int capi_x_intent = 0; | |||
| 19983 | int capi_overwrite_x = 0; | |||
| 19984 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 19985 | int incx = 0; | |||
| 19986 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 19987 | int offx = 0; | |||
| 19988 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 19989 | int lower = 0; | |||
| 19990 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 19991 | int trans = 0; | |||
| 19992 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 19993 | int diag = 0; | |||
| 19994 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 19995 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 19996 | ||||
| 19997 | /*routdebugenter*/ | |||
| 19998 | #ifdef F2PY_REPORT_ATEXIT | |||
| 19999 | f2py_start_clock(); | |||
| 20000 | #endif | |||
| 20001 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 20002 | "OOO|OOOOOi:_fblas.stbmv",\ | |||
| 20003 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 20004 | return NULL((void*)0); | |||
| 20005 | /*frompyobj*/ | |||
| 20006 | /* Processing variable lower */ | |||
| 20007 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 20008 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.stbmv() 3rd keyword (lower) can't be converted to int"); | |||
| 20009 | if (f2py_success) { | |||
| 20010 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","stbmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20011 | /* Processing variable trans */ | |||
| 20012 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 20013 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.stbmv() 4th keyword (trans) can't be converted to int"); | |||
| 20014 | if (f2py_success) { | |||
| 20015 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","stbmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""stbmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 20016 | /* Processing variable diag */ | |||
| 20017 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 20018 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.stbmv() 5th keyword (diag) can't be converted to int"); | |||
| 20019 | if (f2py_success) { | |||
| 20020 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","stbmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20021 | /* Processing variable incx */ | |||
| 20022 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 20023 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.stbmv() 1st keyword (incx) can't be converted to int"); | |||
| 20024 | if (f2py_success) { | |||
| 20025 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","stbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20026 | /* Processing variable offx */ | |||
| 20027 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 20028 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.stbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 20029 | if (f2py_success) { | |||
| 20030 | /* Processing variable a */ | |||
| 20031 | ; | |||
| 20032 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 20033 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 20034 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 20035 | if (!PyErr_Occurred()) | |||
| 20036 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.stbmv to C/Fortran array" ); | |||
| 20037 | } else { | |||
| 20038 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 20039 | ||||
| 20040 | /* Processing variable n */ | |||
| 20041 | n = shape(a,1)a_Dims[1]; | |||
| 20042 | CHECKSCALAR(n>=0,"n>=0","hidden n","stbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 20043 | /* Processing variable lda */ | |||
| 20044 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 20045 | /* Processing variable k */ | |||
| 20046 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.stbmv() 1st argument (k) can't be converted to int"); | |||
| 20047 | if (f2py_success) { | |||
| 20048 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","stbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 20049 | /* Processing variable x */ | |||
| 20050 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 20051 | ; | |||
| 20052 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 20053 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 20054 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 20055 | if (!PyErr_Occurred()) | |||
| 20056 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.stbmv to C/Fortran array" ); | |||
| 20057 | } else { | |||
| 20058 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 20059 | ||||
| 20060 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 20061 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 20062 | /*end of frompyobj*/ | |||
| 20063 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20064 | f2py_start_call_clock(); | |||
| 20065 | #endif | |||
| 20066 | /*callfortranroutine*/ | |||
| 20067 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 20068 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 20069 | if (PyErr_Occurred()) | |||
| 20070 | f2py_success = 0; | |||
| 20071 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20072 | f2py_stop_call_clock(); | |||
| 20073 | #endif | |||
| 20074 | /*end of callfortranroutine*/ | |||
| 20075 | if (f2py_success) { | |||
| 20076 | /*pyobjfrom*/ | |||
| 20077 | /*end of pyobjfrom*/ | |||
| 20078 | CFUNCSMESS("Building return value.\n"); | |||
| 20079 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 20080 | /*closepyobjfrom*/ | |||
| 20081 | /*end of closepyobjfrom*/ | |||
| 20082 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 20083 | /*cleanupfrompyobj*/ | |||
| 20084 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 20085 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 20086 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 20087 | /* End of cleaning variable x */ | |||
| 20088 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 20089 | } /*if (f2py_success) of k*/ | |||
| 20090 | /* End of cleaning variable k */ | |||
| 20091 | /* End of cleaning variable lda */ | |||
| 20092 | } /*CHECKSCALAR(n>=0)*/ | |||
| 20093 | /* End of cleaning variable n */ | |||
| 20094 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 20095 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 20096 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 20097 | /* End of cleaning variable a */ | |||
| 20098 | } /*if (f2py_success) of offx*/ | |||
| 20099 | /* End of cleaning variable offx */ | |||
| 20100 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 20101 | } /*if (f2py_success) of incx*/ | |||
| 20102 | /* End of cleaning variable incx */ | |||
| 20103 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 20104 | } /*if (f2py_success) of diag*/ | |||
| 20105 | /* End of cleaning variable diag */ | |||
| 20106 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 20107 | } /*if (f2py_success) of trans*/ | |||
| 20108 | /* End of cleaning variable trans */ | |||
| 20109 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 20110 | } /*if (f2py_success) of lower*/ | |||
| 20111 | /* End of cleaning variable lower */ | |||
| 20112 | /*end of cleanupfrompyobj*/ | |||
| 20113 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 20114 | /*routdebugfailure*/ | |||
| 20115 | } else { | |||
| 20116 | /*routdebugleave*/ | |||
| 20117 | } | |||
| 20118 | CFUNCSMESS("Freeing memory.\n"); | |||
| 20119 | /*freemem*/ | |||
| 20120 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20121 | f2py_stop_clock(); | |||
| 20122 | #endif | |||
| 20123 | return capi_buildvalue; | |||
| 20124 | } | |||
| 20125 | /******************************** end of stbmv ********************************/ | |||
| 20126 | ||||
| 20127 | /*********************************** dtbmv ***********************************/ | |||
| 20128 | static char doc_f2py_rout__fblas_dtbmv[] = "\ | |||
| 20129 | xout = dtbmv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``dtbmv``.\ | |||
| 20130 | \n\nParameters\n----------\n" | |||
| 20131 | "k : input int\n" | |||
| 20132 | "a : input rank-2 array('d') with bounds (lda,n)\n" | |||
| 20133 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 20134 | "\nOther Parameters\n----------------\n" | |||
| 20135 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 20136 | "incx : input int, optional\n Default: 1\n" | |||
| 20137 | "offx : input int, optional\n Default: 0\n" | |||
| 20138 | "lower : input int, optional\n Default: 0\n" | |||
| 20139 | "trans : input int, optional\n Default: 0\n" | |||
| 20140 | "diag : input int, optional\n Default: 0\n" | |||
| 20141 | "\nReturns\n-------\n" | |||
| 20142 | "xout : rank-1 array('d') with bounds (*) and x storage"; | |||
| 20143 | /* extern void F_FUNC(dtbmv,DTBMV)(char*,char*,char*,F_INT*,F_INT*,double*,F_INT*,double*,F_INT* ); */ | |||
| 20144 | static PyObject *f2py_rout__fblas_dtbmv(const PyObject *capi_self, | |||
| 20145 | PyObject *capi_args, | |||
| 20146 | PyObject *capi_keywds, | |||
| 20147 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,double*,F_INTint*,double*,F_INTint* )) { | |||
| 20148 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 20149 | volatile int f2py_success = 1; | |||
| 20150 | /*decl*/ | |||
| 20151 | ||||
| 20152 | int n = 0; | |||
| 20153 | int k = 0; | |||
| 20154 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 20155 | double *a = NULL((void*)0); | |||
| 20156 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 20157 | const int a_Rank = 2; | |||
| 20158 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 20159 | int capi_a_intent = 0; | |||
| 20160 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 20161 | int lda = 0; | |||
| 20162 | double *x = NULL((void*)0); | |||
| 20163 | npy_intp x_Dims[1] = {-1}; | |||
| 20164 | const int x_Rank = 1; | |||
| 20165 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 20166 | int capi_x_intent = 0; | |||
| 20167 | int capi_overwrite_x = 0; | |||
| 20168 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 20169 | int incx = 0; | |||
| 20170 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 20171 | int offx = 0; | |||
| 20172 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 20173 | int lower = 0; | |||
| 20174 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 20175 | int trans = 0; | |||
| 20176 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 20177 | int diag = 0; | |||
| 20178 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 20179 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 20180 | ||||
| 20181 | /*routdebugenter*/ | |||
| 20182 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20183 | f2py_start_clock(); | |||
| 20184 | #endif | |||
| 20185 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 20186 | "OOO|OOOOOi:_fblas.dtbmv",\ | |||
| 20187 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 20188 | return NULL((void*)0); | |||
| 20189 | /*frompyobj*/ | |||
| 20190 | /* Processing variable lower */ | |||
| 20191 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 20192 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtbmv() 3rd keyword (lower) can't be converted to int"); | |||
| 20193 | if (f2py_success) { | |||
| 20194 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","dtbmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20195 | /* Processing variable trans */ | |||
| 20196 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 20197 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dtbmv() 4th keyword (trans) can't be converted to int"); | |||
| 20198 | if (f2py_success) { | |||
| 20199 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","dtbmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtbmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 20200 | /* Processing variable diag */ | |||
| 20201 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 20202 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtbmv() 5th keyword (diag) can't be converted to int"); | |||
| 20203 | if (f2py_success) { | |||
| 20204 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","dtbmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20205 | /* Processing variable incx */ | |||
| 20206 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 20207 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dtbmv() 1st keyword (incx) can't be converted to int"); | |||
| 20208 | if (f2py_success) { | |||
| 20209 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dtbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20210 | /* Processing variable offx */ | |||
| 20211 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 20212 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dtbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 20213 | if (f2py_success) { | |||
| 20214 | /* Processing variable a */ | |||
| 20215 | ; | |||
| 20216 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 20217 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 20218 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 20219 | if (!PyErr_Occurred()) | |||
| 20220 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dtbmv to C/Fortran array" ); | |||
| 20221 | } else { | |||
| 20222 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 20223 | ||||
| 20224 | /* Processing variable n */ | |||
| 20225 | n = shape(a,1)a_Dims[1]; | |||
| 20226 | CHECKSCALAR(n>=0,"n>=0","hidden n","dtbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 20227 | /* Processing variable lda */ | |||
| 20228 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 20229 | /* Processing variable k */ | |||
| 20230 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.dtbmv() 1st argument (k) can't be converted to int"); | |||
| 20231 | if (f2py_success) { | |||
| 20232 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","dtbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 20233 | /* Processing variable x */ | |||
| 20234 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 20235 | ; | |||
| 20236 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 20237 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 20238 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 20239 | if (!PyErr_Occurred()) | |||
| 20240 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dtbmv to C/Fortran array" ); | |||
| 20241 | } else { | |||
| 20242 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 20243 | ||||
| 20244 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 20245 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 20246 | /*end of frompyobj*/ | |||
| 20247 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20248 | f2py_start_call_clock(); | |||
| 20249 | #endif | |||
| 20250 | /*callfortranroutine*/ | |||
| 20251 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 20252 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 20253 | if (PyErr_Occurred()) | |||
| 20254 | f2py_success = 0; | |||
| 20255 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20256 | f2py_stop_call_clock(); | |||
| 20257 | #endif | |||
| 20258 | /*end of callfortranroutine*/ | |||
| 20259 | if (f2py_success) { | |||
| 20260 | /*pyobjfrom*/ | |||
| 20261 | /*end of pyobjfrom*/ | |||
| 20262 | CFUNCSMESS("Building return value.\n"); | |||
| 20263 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 20264 | /*closepyobjfrom*/ | |||
| 20265 | /*end of closepyobjfrom*/ | |||
| 20266 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 20267 | /*cleanupfrompyobj*/ | |||
| 20268 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 20269 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 20270 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 20271 | /* End of cleaning variable x */ | |||
| 20272 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 20273 | } /*if (f2py_success) of k*/ | |||
| 20274 | /* End of cleaning variable k */ | |||
| 20275 | /* End of cleaning variable lda */ | |||
| 20276 | } /*CHECKSCALAR(n>=0)*/ | |||
| 20277 | /* End of cleaning variable n */ | |||
| 20278 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 20279 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 20280 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 20281 | /* End of cleaning variable a */ | |||
| 20282 | } /*if (f2py_success) of offx*/ | |||
| 20283 | /* End of cleaning variable offx */ | |||
| 20284 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 20285 | } /*if (f2py_success) of incx*/ | |||
| 20286 | /* End of cleaning variable incx */ | |||
| 20287 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 20288 | } /*if (f2py_success) of diag*/ | |||
| 20289 | /* End of cleaning variable diag */ | |||
| 20290 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 20291 | } /*if (f2py_success) of trans*/ | |||
| 20292 | /* End of cleaning variable trans */ | |||
| 20293 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 20294 | } /*if (f2py_success) of lower*/ | |||
| 20295 | /* End of cleaning variable lower */ | |||
| 20296 | /*end of cleanupfrompyobj*/ | |||
| 20297 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 20298 | /*routdebugfailure*/ | |||
| 20299 | } else { | |||
| 20300 | /*routdebugleave*/ | |||
| 20301 | } | |||
| 20302 | CFUNCSMESS("Freeing memory.\n"); | |||
| 20303 | /*freemem*/ | |||
| 20304 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20305 | f2py_stop_clock(); | |||
| 20306 | #endif | |||
| 20307 | return capi_buildvalue; | |||
| 20308 | } | |||
| 20309 | /******************************** end of dtbmv ********************************/ | |||
| 20310 | ||||
| 20311 | /*********************************** ctbmv ***********************************/ | |||
| 20312 | static char doc_f2py_rout__fblas_ctbmv[] = "\ | |||
| 20313 | xout = ctbmv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ctbmv``.\ | |||
| 20314 | \n\nParameters\n----------\n" | |||
| 20315 | "k : input int\n" | |||
| 20316 | "a : input rank-2 array('F') with bounds (lda,n)\n" | |||
| 20317 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 20318 | "\nOther Parameters\n----------------\n" | |||
| 20319 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 20320 | "incx : input int, optional\n Default: 1\n" | |||
| 20321 | "offx : input int, optional\n Default: 0\n" | |||
| 20322 | "lower : input int, optional\n Default: 0\n" | |||
| 20323 | "trans : input int, optional\n Default: 0\n" | |||
| 20324 | "diag : input int, optional\n Default: 0\n" | |||
| 20325 | "\nReturns\n-------\n" | |||
| 20326 | "xout : rank-1 array('F') with bounds (*) and x storage"; | |||
| 20327 | /* extern void F_FUNC(ctbmv,CTBMV)(char*,char*,char*,F_INT*,F_INT*,complex_float*,F_INT*,complex_float*,F_INT* ); */ | |||
| 20328 | static PyObject *f2py_rout__fblas_ctbmv(const PyObject *capi_self, | |||
| 20329 | PyObject *capi_args, | |||
| 20330 | PyObject *capi_keywds, | |||
| 20331 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,complex_float*,F_INTint*,complex_float*,F_INTint* )) { | |||
| 20332 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 20333 | volatile int f2py_success = 1; | |||
| 20334 | /*decl*/ | |||
| 20335 | ||||
| 20336 | int n = 0; | |||
| 20337 | int k = 0; | |||
| 20338 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 20339 | complex_float *a = NULL((void*)0); | |||
| 20340 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 20341 | const int a_Rank = 2; | |||
| 20342 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 20343 | int capi_a_intent = 0; | |||
| 20344 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 20345 | int lda = 0; | |||
| 20346 | complex_float *x = NULL((void*)0); | |||
| 20347 | npy_intp x_Dims[1] = {-1}; | |||
| 20348 | const int x_Rank = 1; | |||
| 20349 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 20350 | int capi_x_intent = 0; | |||
| 20351 | int capi_overwrite_x = 0; | |||
| 20352 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 20353 | int incx = 0; | |||
| 20354 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 20355 | int offx = 0; | |||
| 20356 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 20357 | int lower = 0; | |||
| 20358 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 20359 | int trans = 0; | |||
| 20360 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 20361 | int diag = 0; | |||
| 20362 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 20363 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 20364 | ||||
| 20365 | /*routdebugenter*/ | |||
| 20366 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20367 | f2py_start_clock(); | |||
| 20368 | #endif | |||
| 20369 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 20370 | "OOO|OOOOOi:_fblas.ctbmv",\ | |||
| 20371 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 20372 | return NULL((void*)0); | |||
| 20373 | /*frompyobj*/ | |||
| 20374 | /* Processing variable lower */ | |||
| 20375 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 20376 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctbmv() 3rd keyword (lower) can't be converted to int"); | |||
| 20377 | if (f2py_success) { | |||
| 20378 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ctbmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20379 | /* Processing variable trans */ | |||
| 20380 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 20381 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ctbmv() 4th keyword (trans) can't be converted to int"); | |||
| 20382 | if (f2py_success) { | |||
| 20383 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ctbmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctbmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 20384 | /* Processing variable diag */ | |||
| 20385 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 20386 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctbmv() 5th keyword (diag) can't be converted to int"); | |||
| 20387 | if (f2py_success) { | |||
| 20388 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ctbmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20389 | /* Processing variable incx */ | |||
| 20390 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 20391 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ctbmv() 1st keyword (incx) can't be converted to int"); | |||
| 20392 | if (f2py_success) { | |||
| 20393 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ctbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20394 | /* Processing variable offx */ | |||
| 20395 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 20396 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ctbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 20397 | if (f2py_success) { | |||
| 20398 | /* Processing variable a */ | |||
| 20399 | ; | |||
| 20400 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 20401 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 20402 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 20403 | if (!PyErr_Occurred()) | |||
| 20404 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ctbmv to C/Fortran array" ); | |||
| 20405 | } else { | |||
| 20406 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 20407 | ||||
| 20408 | /* Processing variable n */ | |||
| 20409 | n = shape(a,1)a_Dims[1]; | |||
| 20410 | CHECKSCALAR(n>=0,"n>=0","hidden n","ctbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 20411 | /* Processing variable lda */ | |||
| 20412 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 20413 | /* Processing variable k */ | |||
| 20414 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.ctbmv() 1st argument (k) can't be converted to int"); | |||
| 20415 | if (f2py_success) { | |||
| 20416 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","ctbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 20417 | /* Processing variable x */ | |||
| 20418 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 20419 | ; | |||
| 20420 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 20421 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 20422 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 20423 | if (!PyErr_Occurred()) | |||
| 20424 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ctbmv to C/Fortran array" ); | |||
| 20425 | } else { | |||
| 20426 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 20427 | ||||
| 20428 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 20429 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 20430 | /*end of frompyobj*/ | |||
| 20431 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20432 | f2py_start_call_clock(); | |||
| 20433 | #endif | |||
| 20434 | /*callfortranroutine*/ | |||
| 20435 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 20436 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 20437 | if (PyErr_Occurred()) | |||
| 20438 | f2py_success = 0; | |||
| 20439 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20440 | f2py_stop_call_clock(); | |||
| 20441 | #endif | |||
| 20442 | /*end of callfortranroutine*/ | |||
| 20443 | if (f2py_success) { | |||
| 20444 | /*pyobjfrom*/ | |||
| 20445 | /*end of pyobjfrom*/ | |||
| 20446 | CFUNCSMESS("Building return value.\n"); | |||
| 20447 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 20448 | /*closepyobjfrom*/ | |||
| 20449 | /*end of closepyobjfrom*/ | |||
| 20450 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 20451 | /*cleanupfrompyobj*/ | |||
| 20452 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 20453 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 20454 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 20455 | /* End of cleaning variable x */ | |||
| 20456 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 20457 | } /*if (f2py_success) of k*/ | |||
| 20458 | /* End of cleaning variable k */ | |||
| 20459 | /* End of cleaning variable lda */ | |||
| 20460 | } /*CHECKSCALAR(n>=0)*/ | |||
| 20461 | /* End of cleaning variable n */ | |||
| 20462 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 20463 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 20464 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 20465 | /* End of cleaning variable a */ | |||
| 20466 | } /*if (f2py_success) of offx*/ | |||
| 20467 | /* End of cleaning variable offx */ | |||
| 20468 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 20469 | } /*if (f2py_success) of incx*/ | |||
| 20470 | /* End of cleaning variable incx */ | |||
| 20471 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 20472 | } /*if (f2py_success) of diag*/ | |||
| 20473 | /* End of cleaning variable diag */ | |||
| 20474 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 20475 | } /*if (f2py_success) of trans*/ | |||
| 20476 | /* End of cleaning variable trans */ | |||
| 20477 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 20478 | } /*if (f2py_success) of lower*/ | |||
| 20479 | /* End of cleaning variable lower */ | |||
| 20480 | /*end of cleanupfrompyobj*/ | |||
| 20481 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 20482 | /*routdebugfailure*/ | |||
| 20483 | } else { | |||
| 20484 | /*routdebugleave*/ | |||
| 20485 | } | |||
| 20486 | CFUNCSMESS("Freeing memory.\n"); | |||
| 20487 | /*freemem*/ | |||
| 20488 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20489 | f2py_stop_clock(); | |||
| 20490 | #endif | |||
| 20491 | return capi_buildvalue; | |||
| 20492 | } | |||
| 20493 | /******************************** end of ctbmv ********************************/ | |||
| 20494 | ||||
| 20495 | /*********************************** ztbmv ***********************************/ | |||
| 20496 | static char doc_f2py_rout__fblas_ztbmv[] = "\ | |||
| 20497 | xout = ztbmv(k,a,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ztbmv``.\ | |||
| 20498 | \n\nParameters\n----------\n" | |||
| 20499 | "k : input int\n" | |||
| 20500 | "a : input rank-2 array('D') with bounds (lda,n)\n" | |||
| 20501 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 20502 | "\nOther Parameters\n----------------\n" | |||
| 20503 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 20504 | "incx : input int, optional\n Default: 1\n" | |||
| 20505 | "offx : input int, optional\n Default: 0\n" | |||
| 20506 | "lower : input int, optional\n Default: 0\n" | |||
| 20507 | "trans : input int, optional\n Default: 0\n" | |||
| 20508 | "diag : input int, optional\n Default: 0\n" | |||
| 20509 | "\nReturns\n-------\n" | |||
| 20510 | "xout : rank-1 array('D') with bounds (*) and x storage"; | |||
| 20511 | /* extern void F_FUNC(ztbmv,ZTBMV)(char*,char*,char*,F_INT*,F_INT*,complex_double*,F_INT*,complex_double*,F_INT* ); */ | |||
| 20512 | static PyObject *f2py_rout__fblas_ztbmv(const PyObject *capi_self, | |||
| 20513 | PyObject *capi_args, | |||
| 20514 | PyObject *capi_keywds, | |||
| 20515 | void (*f2py_func)(char*,char*,char*,F_INTint*,F_INTint*,complex_double*,F_INTint*,complex_double*,F_INTint* )) { | |||
| 20516 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 20517 | volatile int f2py_success = 1; | |||
| 20518 | /*decl*/ | |||
| 20519 | ||||
| 20520 | int n = 0; | |||
| 20521 | int k = 0; | |||
| 20522 | PyObject *k_capi = Py_None(&_Py_NoneStruct); | |||
| 20523 | complex_double *a = NULL((void*)0); | |||
| 20524 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 20525 | const int a_Rank = 2; | |||
| 20526 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 20527 | int capi_a_intent = 0; | |||
| 20528 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 20529 | int lda = 0; | |||
| 20530 | complex_double *x = NULL((void*)0); | |||
| 20531 | npy_intp x_Dims[1] = {-1}; | |||
| 20532 | const int x_Rank = 1; | |||
| 20533 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 20534 | int capi_x_intent = 0; | |||
| 20535 | int capi_overwrite_x = 0; | |||
| 20536 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 20537 | int incx = 0; | |||
| 20538 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 20539 | int offx = 0; | |||
| 20540 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 20541 | int lower = 0; | |||
| 20542 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 20543 | int trans = 0; | |||
| 20544 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 20545 | int diag = 0; | |||
| 20546 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 20547 | static char *capi_kwlist[] = {"k","a","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 20548 | ||||
| 20549 | /*routdebugenter*/ | |||
| 20550 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20551 | f2py_start_clock(); | |||
| 20552 | #endif | |||
| 20553 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 20554 | "OOO|OOOOOi:_fblas.ztbmv",\ | |||
| 20555 | capi_kwlist,&k_capi,&a_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 20556 | return NULL((void*)0); | |||
| 20557 | /*frompyobj*/ | |||
| 20558 | /* Processing variable lower */ | |||
| 20559 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 20560 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztbmv() 3rd keyword (lower) can't be converted to int"); | |||
| 20561 | if (f2py_success) { | |||
| 20562 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ztbmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20563 | /* Processing variable trans */ | |||
| 20564 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 20565 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ztbmv() 4th keyword (trans) can't be converted to int"); | |||
| 20566 | if (f2py_success) { | |||
| 20567 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ztbmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztbmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 20568 | /* Processing variable diag */ | |||
| 20569 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 20570 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztbmv() 5th keyword (diag) can't be converted to int"); | |||
| 20571 | if (f2py_success) { | |||
| 20572 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ztbmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20573 | /* Processing variable incx */ | |||
| 20574 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 20575 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ztbmv() 1st keyword (incx) can't be converted to int"); | |||
| 20576 | if (f2py_success) { | |||
| 20577 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ztbmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20578 | /* Processing variable offx */ | |||
| 20579 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 20580 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ztbmv() 2nd keyword (offx) can't be converted to int"); | |||
| 20581 | if (f2py_success) { | |||
| 20582 | /* Processing variable a */ | |||
| 20583 | ; | |||
| 20584 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 20585 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 20586 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 20587 | if (!PyErr_Occurred()) | |||
| 20588 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ztbmv to C/Fortran array" ); | |||
| 20589 | } else { | |||
| 20590 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 20591 | ||||
| 20592 | /* Processing variable n */ | |||
| 20593 | n = shape(a,1)a_Dims[1]; | |||
| 20594 | CHECKSCALAR(n>=0,"n>=0","hidden n","ztbmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbmv:n=%d", "(""n>=0"") failed for ""hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 20595 | /* Processing variable lda */ | |||
| 20596 | lda = MAX(shape(a,0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 20597 | /* Processing variable k */ | |||
| 20598 | f2py_success = int_from_pyobj(&k,k_capi,"_fblas.ztbmv() 1st argument (k) can't be converted to int"); | |||
| 20599 | if (f2py_success) { | |||
| 20600 | CHECKSCALAR(k>=0&&k<=lda-1,"k>=0&&k<=lda-1","1st argument k","ztbmv:k=%d",k)if (!(k>=0&&k<=lda-1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztbmv:k=%d", "(""k>=0&&k<=lda-1"") failed for " "1st argument k", k); PyErr_SetString(_fblas_error,errstring) ; } else { | |||
| 20601 | /* Processing variable x */ | |||
| 20602 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 20603 | ; | |||
| 20604 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 20605 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 20606 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 20607 | if (!PyErr_Occurred()) | |||
| 20608 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ztbmv to C/Fortran array" ); | |||
| 20609 | } else { | |||
| 20610 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 20611 | ||||
| 20612 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 20613 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 20614 | /*end of frompyobj*/ | |||
| 20615 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20616 | f2py_start_call_clock(); | |||
| 20617 | #endif | |||
| 20618 | /*callfortranroutine*/ | |||
| 20619 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,&k,a,&lda,x+offx,&incx) ; | |||
| 20620 | /*(*f2py_func)(&n,&k,a,&lda,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 20621 | if (PyErr_Occurred()) | |||
| 20622 | f2py_success = 0; | |||
| 20623 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20624 | f2py_stop_call_clock(); | |||
| 20625 | #endif | |||
| 20626 | /*end of callfortranroutine*/ | |||
| 20627 | if (f2py_success) { | |||
| 20628 | /*pyobjfrom*/ | |||
| 20629 | /*end of pyobjfrom*/ | |||
| 20630 | CFUNCSMESS("Building return value.\n"); | |||
| 20631 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 20632 | /*closepyobjfrom*/ | |||
| 20633 | /*end of closepyobjfrom*/ | |||
| 20634 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 20635 | /*cleanupfrompyobj*/ | |||
| 20636 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 20637 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 20638 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 20639 | /* End of cleaning variable x */ | |||
| 20640 | } /*CHECKSCALAR(k>=0&&k<=lda-1)*/ | |||
| 20641 | } /*if (f2py_success) of k*/ | |||
| 20642 | /* End of cleaning variable k */ | |||
| 20643 | /* End of cleaning variable lda */ | |||
| 20644 | } /*CHECKSCALAR(n>=0)*/ | |||
| 20645 | /* End of cleaning variable n */ | |||
| 20646 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 20647 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 20648 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 20649 | /* End of cleaning variable a */ | |||
| 20650 | } /*if (f2py_success) of offx*/ | |||
| 20651 | /* End of cleaning variable offx */ | |||
| 20652 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 20653 | } /*if (f2py_success) of incx*/ | |||
| 20654 | /* End of cleaning variable incx */ | |||
| 20655 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 20656 | } /*if (f2py_success) of diag*/ | |||
| 20657 | /* End of cleaning variable diag */ | |||
| 20658 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 20659 | } /*if (f2py_success) of trans*/ | |||
| 20660 | /* End of cleaning variable trans */ | |||
| 20661 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 20662 | } /*if (f2py_success) of lower*/ | |||
| 20663 | /* End of cleaning variable lower */ | |||
| 20664 | /*end of cleanupfrompyobj*/ | |||
| 20665 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 20666 | /*routdebugfailure*/ | |||
| 20667 | } else { | |||
| 20668 | /*routdebugleave*/ | |||
| 20669 | } | |||
| 20670 | CFUNCSMESS("Freeing memory.\n"); | |||
| 20671 | /*freemem*/ | |||
| 20672 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20673 | f2py_stop_clock(); | |||
| 20674 | #endif | |||
| 20675 | return capi_buildvalue; | |||
| 20676 | } | |||
| 20677 | /******************************** end of ztbmv ********************************/ | |||
| 20678 | ||||
| 20679 | /*********************************** stpmv ***********************************/ | |||
| 20680 | static char doc_f2py_rout__fblas_stpmv[] = "\ | |||
| 20681 | xout = stpmv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``stpmv``.\ | |||
| 20682 | \n\nParameters\n----------\n" | |||
| 20683 | "n : input int\n" | |||
| 20684 | "ap : input rank-1 array('f') with bounds (*)\n" | |||
| 20685 | "x : input rank-1 array('f') with bounds (*)\n" | |||
| 20686 | "\nOther Parameters\n----------------\n" | |||
| 20687 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 20688 | "incx : input int, optional\n Default: 1\n" | |||
| 20689 | "offx : input int, optional\n Default: 0\n" | |||
| 20690 | "lower : input int, optional\n Default: 0\n" | |||
| 20691 | "trans : input int, optional\n Default: 0\n" | |||
| 20692 | "diag : input int, optional\n Default: 0\n" | |||
| 20693 | "\nReturns\n-------\n" | |||
| 20694 | "xout : rank-1 array('f') with bounds (*) and x storage"; | |||
| 20695 | /* extern void F_FUNC(stpmv,STPMV)(char*,char*,char*,F_INT*,float*,float*,F_INT* ); */ | |||
| 20696 | static PyObject *f2py_rout__fblas_stpmv(const PyObject *capi_self, | |||
| 20697 | PyObject *capi_args, | |||
| 20698 | PyObject *capi_keywds, | |||
| 20699 | void (*f2py_func)(char*,char*,char*,F_INTint*,float*,float*,F_INTint* )) { | |||
| 20700 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 20701 | volatile int f2py_success = 1; | |||
| 20702 | /*decl*/ | |||
| 20703 | ||||
| 20704 | int n = 0; | |||
| 20705 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 20706 | float *ap = NULL((void*)0); | |||
| 20707 | npy_intp ap_Dims[1] = {-1}; | |||
| 20708 | const int ap_Rank = 1; | |||
| 20709 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 20710 | int capi_ap_intent = 0; | |||
| 20711 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 20712 | float *x = NULL((void*)0); | |||
| 20713 | npy_intp x_Dims[1] = {-1}; | |||
| 20714 | const int x_Rank = 1; | |||
| 20715 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 20716 | int capi_x_intent = 0; | |||
| 20717 | int capi_overwrite_x = 0; | |||
| 20718 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 20719 | int incx = 0; | |||
| 20720 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 20721 | int offx = 0; | |||
| 20722 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 20723 | int lower = 0; | |||
| 20724 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 20725 | int trans = 0; | |||
| 20726 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 20727 | int diag = 0; | |||
| 20728 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 20729 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 20730 | ||||
| 20731 | /*routdebugenter*/ | |||
| 20732 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20733 | f2py_start_clock(); | |||
| 20734 | #endif | |||
| 20735 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 20736 | "OOO|OOOOOi:_fblas.stpmv",\ | |||
| 20737 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 20738 | return NULL((void*)0); | |||
| 20739 | /*frompyobj*/ | |||
| 20740 | /* Processing variable n */ | |||
| 20741 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.stpmv() 1st argument (n) can't be converted to int"); | |||
| 20742 | if (f2py_success) { | |||
| 20743 | CHECKSCALAR(n>=0,"n>=0","1st argument n","stpmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 20744 | /* Processing variable lower */ | |||
| 20745 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 20746 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.stpmv() 3rd keyword (lower) can't be converted to int"); | |||
| 20747 | if (f2py_success) { | |||
| 20748 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","stpmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20749 | /* Processing variable trans */ | |||
| 20750 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 20751 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.stpmv() 4th keyword (trans) can't be converted to int"); | |||
| 20752 | if (f2py_success) { | |||
| 20753 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","stpmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""stpmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 20754 | /* Processing variable diag */ | |||
| 20755 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 20756 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.stpmv() 5th keyword (diag) can't be converted to int"); | |||
| 20757 | if (f2py_success) { | |||
| 20758 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","stpmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20759 | /* Processing variable incx */ | |||
| 20760 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 20761 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.stpmv() 1st keyword (incx) can't be converted to int"); | |||
| 20762 | if (f2py_success) { | |||
| 20763 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","stpmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""stpmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20764 | /* Processing variable offx */ | |||
| 20765 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 20766 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.stpmv() 2nd keyword (offx) can't be converted to int"); | |||
| 20767 | if (f2py_success) { | |||
| 20768 | /* Processing variable ap */ | |||
| 20769 | ; | |||
| 20770 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 20771 | capi_ap_tmp = array_from_pyobj(NPY_FLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 20772 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 20773 | if (!PyErr_Occurred()) | |||
| 20774 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.stpmv to C/Fortran array" ); | |||
| 20775 | } else { | |||
| 20776 | ap = (float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 20777 | ||||
| 20778 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 20779 | /* Processing variable x */ | |||
| 20780 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 20781 | ; | |||
| 20782 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 20783 | capi_x_tmp = array_from_pyobj(NPY_FLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 20784 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 20785 | if (!PyErr_Occurred()) | |||
| 20786 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.stpmv to C/Fortran array" ); | |||
| 20787 | } else { | |||
| 20788 | x = (float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 20789 | ||||
| 20790 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 20791 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 20792 | /*end of frompyobj*/ | |||
| 20793 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20794 | f2py_start_call_clock(); | |||
| 20795 | #endif | |||
| 20796 | /*callfortranroutine*/ | |||
| 20797 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 20798 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 20799 | if (PyErr_Occurred()) | |||
| 20800 | f2py_success = 0; | |||
| 20801 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20802 | f2py_stop_call_clock(); | |||
| 20803 | #endif | |||
| 20804 | /*end of callfortranroutine*/ | |||
| 20805 | if (f2py_success) { | |||
| 20806 | /*pyobjfrom*/ | |||
| 20807 | /*end of pyobjfrom*/ | |||
| 20808 | CFUNCSMESS("Building return value.\n"); | |||
| 20809 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 20810 | /*closepyobjfrom*/ | |||
| 20811 | /*end of closepyobjfrom*/ | |||
| 20812 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 20813 | /*cleanupfrompyobj*/ | |||
| 20814 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 20815 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 20816 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 20817 | /* End of cleaning variable x */ | |||
| 20818 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 20819 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 20820 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 20821 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 20822 | /* End of cleaning variable ap */ | |||
| 20823 | } /*if (f2py_success) of offx*/ | |||
| 20824 | /* End of cleaning variable offx */ | |||
| 20825 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 20826 | } /*if (f2py_success) of incx*/ | |||
| 20827 | /* End of cleaning variable incx */ | |||
| 20828 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 20829 | } /*if (f2py_success) of diag*/ | |||
| 20830 | /* End of cleaning variable diag */ | |||
| 20831 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 20832 | } /*if (f2py_success) of trans*/ | |||
| 20833 | /* End of cleaning variable trans */ | |||
| 20834 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 20835 | } /*if (f2py_success) of lower*/ | |||
| 20836 | /* End of cleaning variable lower */ | |||
| 20837 | } /*CHECKSCALAR(n>=0)*/ | |||
| 20838 | } /*if (f2py_success) of n*/ | |||
| 20839 | /* End of cleaning variable n */ | |||
| 20840 | /*end of cleanupfrompyobj*/ | |||
| 20841 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 20842 | /*routdebugfailure*/ | |||
| 20843 | } else { | |||
| 20844 | /*routdebugleave*/ | |||
| 20845 | } | |||
| 20846 | CFUNCSMESS("Freeing memory.\n"); | |||
| 20847 | /*freemem*/ | |||
| 20848 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20849 | f2py_stop_clock(); | |||
| 20850 | #endif | |||
| 20851 | return capi_buildvalue; | |||
| 20852 | } | |||
| 20853 | /******************************** end of stpmv ********************************/ | |||
| 20854 | ||||
| 20855 | /*********************************** dtpmv ***********************************/ | |||
| 20856 | static char doc_f2py_rout__fblas_dtpmv[] = "\ | |||
| 20857 | xout = dtpmv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``dtpmv``.\ | |||
| 20858 | \n\nParameters\n----------\n" | |||
| 20859 | "n : input int\n" | |||
| 20860 | "ap : input rank-1 array('d') with bounds (*)\n" | |||
| 20861 | "x : input rank-1 array('d') with bounds (*)\n" | |||
| 20862 | "\nOther Parameters\n----------------\n" | |||
| 20863 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 20864 | "incx : input int, optional\n Default: 1\n" | |||
| 20865 | "offx : input int, optional\n Default: 0\n" | |||
| 20866 | "lower : input int, optional\n Default: 0\n" | |||
| 20867 | "trans : input int, optional\n Default: 0\n" | |||
| 20868 | "diag : input int, optional\n Default: 0\n" | |||
| 20869 | "\nReturns\n-------\n" | |||
| 20870 | "xout : rank-1 array('d') with bounds (*) and x storage"; | |||
| 20871 | /* extern void F_FUNC(dtpmv,DTPMV)(char*,char*,char*,F_INT*,double*,double*,F_INT* ); */ | |||
| 20872 | static PyObject *f2py_rout__fblas_dtpmv(const PyObject *capi_self, | |||
| 20873 | PyObject *capi_args, | |||
| 20874 | PyObject *capi_keywds, | |||
| 20875 | void (*f2py_func)(char*,char*,char*,F_INTint*,double*,double*,F_INTint* )) { | |||
| 20876 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 20877 | volatile int f2py_success = 1; | |||
| 20878 | /*decl*/ | |||
| 20879 | ||||
| 20880 | int n = 0; | |||
| 20881 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 20882 | double *ap = NULL((void*)0); | |||
| 20883 | npy_intp ap_Dims[1] = {-1}; | |||
| 20884 | const int ap_Rank = 1; | |||
| 20885 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 20886 | int capi_ap_intent = 0; | |||
| 20887 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 20888 | double *x = NULL((void*)0); | |||
| 20889 | npy_intp x_Dims[1] = {-1}; | |||
| 20890 | const int x_Rank = 1; | |||
| 20891 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 20892 | int capi_x_intent = 0; | |||
| 20893 | int capi_overwrite_x = 0; | |||
| 20894 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 20895 | int incx = 0; | |||
| 20896 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 20897 | int offx = 0; | |||
| 20898 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 20899 | int lower = 0; | |||
| 20900 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 20901 | int trans = 0; | |||
| 20902 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 20903 | int diag = 0; | |||
| 20904 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 20905 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 20906 | ||||
| 20907 | /*routdebugenter*/ | |||
| 20908 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20909 | f2py_start_clock(); | |||
| 20910 | #endif | |||
| 20911 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 20912 | "OOO|OOOOOi:_fblas.dtpmv",\ | |||
| 20913 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 20914 | return NULL((void*)0); | |||
| 20915 | /*frompyobj*/ | |||
| 20916 | /* Processing variable n */ | |||
| 20917 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.dtpmv() 1st argument (n) can't be converted to int"); | |||
| 20918 | if (f2py_success) { | |||
| 20919 | CHECKSCALAR(n>=0,"n>=0","1st argument n","dtpmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 20920 | /* Processing variable lower */ | |||
| 20921 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 20922 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtpmv() 3rd keyword (lower) can't be converted to int"); | |||
| 20923 | if (f2py_success) { | |||
| 20924 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","dtpmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20925 | /* Processing variable trans */ | |||
| 20926 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 20927 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dtpmv() 4th keyword (trans) can't be converted to int"); | |||
| 20928 | if (f2py_success) { | |||
| 20929 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","dtpmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtpmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 20930 | /* Processing variable diag */ | |||
| 20931 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 20932 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtpmv() 5th keyword (diag) can't be converted to int"); | |||
| 20933 | if (f2py_success) { | |||
| 20934 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","dtpmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20935 | /* Processing variable incx */ | |||
| 20936 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 20937 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.dtpmv() 1st keyword (incx) can't be converted to int"); | |||
| 20938 | if (f2py_success) { | |||
| 20939 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","dtpmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtpmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 20940 | /* Processing variable offx */ | |||
| 20941 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 20942 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.dtpmv() 2nd keyword (offx) can't be converted to int"); | |||
| 20943 | if (f2py_success) { | |||
| 20944 | /* Processing variable ap */ | |||
| 20945 | ; | |||
| 20946 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 20947 | capi_ap_tmp = array_from_pyobj(NPY_DOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 20948 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 20949 | if (!PyErr_Occurred()) | |||
| 20950 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.dtpmv to C/Fortran array" ); | |||
| 20951 | } else { | |||
| 20952 | ap = (double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 20953 | ||||
| 20954 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 20955 | /* Processing variable x */ | |||
| 20956 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 20957 | ; | |||
| 20958 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 20959 | capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 20960 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 20961 | if (!PyErr_Occurred()) | |||
| 20962 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.dtpmv to C/Fortran array" ); | |||
| 20963 | } else { | |||
| 20964 | x = (double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 20965 | ||||
| 20966 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 20967 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 20968 | /*end of frompyobj*/ | |||
| 20969 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20970 | f2py_start_call_clock(); | |||
| 20971 | #endif | |||
| 20972 | /*callfortranroutine*/ | |||
| 20973 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 20974 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 20975 | if (PyErr_Occurred()) | |||
| 20976 | f2py_success = 0; | |||
| 20977 | #ifdef F2PY_REPORT_ATEXIT | |||
| 20978 | f2py_stop_call_clock(); | |||
| 20979 | #endif | |||
| 20980 | /*end of callfortranroutine*/ | |||
| 20981 | if (f2py_success) { | |||
| 20982 | /*pyobjfrom*/ | |||
| 20983 | /*end of pyobjfrom*/ | |||
| 20984 | CFUNCSMESS("Building return value.\n"); | |||
| 20985 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 20986 | /*closepyobjfrom*/ | |||
| 20987 | /*end of closepyobjfrom*/ | |||
| 20988 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 20989 | /*cleanupfrompyobj*/ | |||
| 20990 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 20991 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 20992 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 20993 | /* End of cleaning variable x */ | |||
| 20994 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 20995 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 20996 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 20997 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 20998 | /* End of cleaning variable ap */ | |||
| 20999 | } /*if (f2py_success) of offx*/ | |||
| 21000 | /* End of cleaning variable offx */ | |||
| 21001 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 21002 | } /*if (f2py_success) of incx*/ | |||
| 21003 | /* End of cleaning variable incx */ | |||
| 21004 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 21005 | } /*if (f2py_success) of diag*/ | |||
| 21006 | /* End of cleaning variable diag */ | |||
| 21007 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 21008 | } /*if (f2py_success) of trans*/ | |||
| 21009 | /* End of cleaning variable trans */ | |||
| 21010 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 21011 | } /*if (f2py_success) of lower*/ | |||
| 21012 | /* End of cleaning variable lower */ | |||
| 21013 | } /*CHECKSCALAR(n>=0)*/ | |||
| 21014 | } /*if (f2py_success) of n*/ | |||
| 21015 | /* End of cleaning variable n */ | |||
| 21016 | /*end of cleanupfrompyobj*/ | |||
| 21017 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 21018 | /*routdebugfailure*/ | |||
| 21019 | } else { | |||
| 21020 | /*routdebugleave*/ | |||
| 21021 | } | |||
| 21022 | CFUNCSMESS("Freeing memory.\n"); | |||
| 21023 | /*freemem*/ | |||
| 21024 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21025 | f2py_stop_clock(); | |||
| 21026 | #endif | |||
| 21027 | return capi_buildvalue; | |||
| 21028 | } | |||
| 21029 | /******************************** end of dtpmv ********************************/ | |||
| 21030 | ||||
| 21031 | /*********************************** ctpmv ***********************************/ | |||
| 21032 | static char doc_f2py_rout__fblas_ctpmv[] = "\ | |||
| 21033 | xout = ctpmv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ctpmv``.\ | |||
| 21034 | \n\nParameters\n----------\n" | |||
| 21035 | "n : input int\n" | |||
| 21036 | "ap : input rank-1 array('F') with bounds (*)\n" | |||
| 21037 | "x : input rank-1 array('F') with bounds (*)\n" | |||
| 21038 | "\nOther Parameters\n----------------\n" | |||
| 21039 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 21040 | "incx : input int, optional\n Default: 1\n" | |||
| 21041 | "offx : input int, optional\n Default: 0\n" | |||
| 21042 | "lower : input int, optional\n Default: 0\n" | |||
| 21043 | "trans : input int, optional\n Default: 0\n" | |||
| 21044 | "diag : input int, optional\n Default: 0\n" | |||
| 21045 | "\nReturns\n-------\n" | |||
| 21046 | "xout : rank-1 array('F') with bounds (*) and x storage"; | |||
| 21047 | /* extern void F_FUNC(ctpmv,CTPMV)(char*,char*,char*,F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 21048 | static PyObject *f2py_rout__fblas_ctpmv(const PyObject *capi_self, | |||
| 21049 | PyObject *capi_args, | |||
| 21050 | PyObject *capi_keywds, | |||
| 21051 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 21052 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 21053 | volatile int f2py_success = 1; | |||
| 21054 | /*decl*/ | |||
| 21055 | ||||
| 21056 | int n = 0; | |||
| 21057 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 21058 | complex_float *ap = NULL((void*)0); | |||
| 21059 | npy_intp ap_Dims[1] = {-1}; | |||
| 21060 | const int ap_Rank = 1; | |||
| 21061 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 21062 | int capi_ap_intent = 0; | |||
| 21063 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 21064 | complex_float *x = NULL((void*)0); | |||
| 21065 | npy_intp x_Dims[1] = {-1}; | |||
| 21066 | const int x_Rank = 1; | |||
| 21067 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 21068 | int capi_x_intent = 0; | |||
| 21069 | int capi_overwrite_x = 0; | |||
| 21070 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 21071 | int incx = 0; | |||
| 21072 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 21073 | int offx = 0; | |||
| 21074 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 21075 | int lower = 0; | |||
| 21076 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 21077 | int trans = 0; | |||
| 21078 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 21079 | int diag = 0; | |||
| 21080 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 21081 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 21082 | ||||
| 21083 | /*routdebugenter*/ | |||
| 21084 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21085 | f2py_start_clock(); | |||
| 21086 | #endif | |||
| 21087 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 21088 | "OOO|OOOOOi:_fblas.ctpmv",\ | |||
| 21089 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 21090 | return NULL((void*)0); | |||
| 21091 | /*frompyobj*/ | |||
| 21092 | /* Processing variable n */ | |||
| 21093 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ctpmv() 1st argument (n) can't be converted to int"); | |||
| 21094 | if (f2py_success) { | |||
| 21095 | CHECKSCALAR(n>=0,"n>=0","1st argument n","ctpmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 21096 | /* Processing variable lower */ | |||
| 21097 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 21098 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctpmv() 3rd keyword (lower) can't be converted to int"); | |||
| 21099 | if (f2py_success) { | |||
| 21100 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ctpmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 21101 | /* Processing variable trans */ | |||
| 21102 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 21103 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ctpmv() 4th keyword (trans) can't be converted to int"); | |||
| 21104 | if (f2py_success) { | |||
| 21105 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ctpmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctpmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 21106 | /* Processing variable diag */ | |||
| 21107 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 21108 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctpmv() 5th keyword (diag) can't be converted to int"); | |||
| 21109 | if (f2py_success) { | |||
| 21110 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ctpmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 21111 | /* Processing variable incx */ | |||
| 21112 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 21113 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ctpmv() 1st keyword (incx) can't be converted to int"); | |||
| 21114 | if (f2py_success) { | |||
| 21115 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ctpmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctpmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 21116 | /* Processing variable offx */ | |||
| 21117 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 21118 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ctpmv() 2nd keyword (offx) can't be converted to int"); | |||
| 21119 | if (f2py_success) { | |||
| 21120 | /* Processing variable ap */ | |||
| 21121 | ; | |||
| 21122 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 21123 | capi_ap_tmp = array_from_pyobj(NPY_CFLOAT,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 21124 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 21125 | if (!PyErr_Occurred()) | |||
| 21126 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.ctpmv to C/Fortran array" ); | |||
| 21127 | } else { | |||
| 21128 | ap = (complex_float *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 21129 | ||||
| 21130 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 21131 | /* Processing variable x */ | |||
| 21132 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 21133 | ; | |||
| 21134 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 21135 | capi_x_tmp = array_from_pyobj(NPY_CFLOAT,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 21136 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 21137 | if (!PyErr_Occurred()) | |||
| 21138 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ctpmv to C/Fortran array" ); | |||
| 21139 | } else { | |||
| 21140 | x = (complex_float *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 21141 | ||||
| 21142 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 21143 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 21144 | /*end of frompyobj*/ | |||
| 21145 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21146 | f2py_start_call_clock(); | |||
| 21147 | #endif | |||
| 21148 | /*callfortranroutine*/ | |||
| 21149 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 21150 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 21151 | if (PyErr_Occurred()) | |||
| 21152 | f2py_success = 0; | |||
| 21153 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21154 | f2py_stop_call_clock(); | |||
| 21155 | #endif | |||
| 21156 | /*end of callfortranroutine*/ | |||
| 21157 | if (f2py_success) { | |||
| 21158 | /*pyobjfrom*/ | |||
| 21159 | /*end of pyobjfrom*/ | |||
| 21160 | CFUNCSMESS("Building return value.\n"); | |||
| 21161 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 21162 | /*closepyobjfrom*/ | |||
| 21163 | /*end of closepyobjfrom*/ | |||
| 21164 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 21165 | /*cleanupfrompyobj*/ | |||
| 21166 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 21167 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 21168 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 21169 | /* End of cleaning variable x */ | |||
| 21170 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 21171 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 21172 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 21173 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 21174 | /* End of cleaning variable ap */ | |||
| 21175 | } /*if (f2py_success) of offx*/ | |||
| 21176 | /* End of cleaning variable offx */ | |||
| 21177 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 21178 | } /*if (f2py_success) of incx*/ | |||
| 21179 | /* End of cleaning variable incx */ | |||
| 21180 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 21181 | } /*if (f2py_success) of diag*/ | |||
| 21182 | /* End of cleaning variable diag */ | |||
| 21183 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 21184 | } /*if (f2py_success) of trans*/ | |||
| 21185 | /* End of cleaning variable trans */ | |||
| 21186 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 21187 | } /*if (f2py_success) of lower*/ | |||
| 21188 | /* End of cleaning variable lower */ | |||
| 21189 | } /*CHECKSCALAR(n>=0)*/ | |||
| 21190 | } /*if (f2py_success) of n*/ | |||
| 21191 | /* End of cleaning variable n */ | |||
| 21192 | /*end of cleanupfrompyobj*/ | |||
| 21193 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 21194 | /*routdebugfailure*/ | |||
| 21195 | } else { | |||
| 21196 | /*routdebugleave*/ | |||
| 21197 | } | |||
| 21198 | CFUNCSMESS("Freeing memory.\n"); | |||
| 21199 | /*freemem*/ | |||
| 21200 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21201 | f2py_stop_clock(); | |||
| 21202 | #endif | |||
| 21203 | return capi_buildvalue; | |||
| 21204 | } | |||
| 21205 | /******************************** end of ctpmv ********************************/ | |||
| 21206 | ||||
| 21207 | /*********************************** ztpmv ***********************************/ | |||
| 21208 | static char doc_f2py_rout__fblas_ztpmv[] = "\ | |||
| 21209 | xout = ztpmv(n,ap,x,[incx,offx,lower,trans,diag,overwrite_x])\n\nWrapper for ``ztpmv``.\ | |||
| 21210 | \n\nParameters\n----------\n" | |||
| 21211 | "n : input int\n" | |||
| 21212 | "ap : input rank-1 array('D') with bounds (*)\n" | |||
| 21213 | "x : input rank-1 array('D') with bounds (*)\n" | |||
| 21214 | "\nOther Parameters\n----------------\n" | |||
| 21215 | "overwrite_x : input int, optional\n Default: 0\n" | |||
| 21216 | "incx : input int, optional\n Default: 1\n" | |||
| 21217 | "offx : input int, optional\n Default: 0\n" | |||
| 21218 | "lower : input int, optional\n Default: 0\n" | |||
| 21219 | "trans : input int, optional\n Default: 0\n" | |||
| 21220 | "diag : input int, optional\n Default: 0\n" | |||
| 21221 | "\nReturns\n-------\n" | |||
| 21222 | "xout : rank-1 array('D') with bounds (*) and x storage"; | |||
| 21223 | /* extern void F_FUNC(ztpmv,ZTPMV)(char*,char*,char*,F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 21224 | static PyObject *f2py_rout__fblas_ztpmv(const PyObject *capi_self, | |||
| 21225 | PyObject *capi_args, | |||
| 21226 | PyObject *capi_keywds, | |||
| 21227 | void (*f2py_func)(char*,char*,char*,F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 21228 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 21229 | volatile int f2py_success = 1; | |||
| 21230 | /*decl*/ | |||
| 21231 | ||||
| 21232 | int n = 0; | |||
| 21233 | PyObject *n_capi = Py_None(&_Py_NoneStruct); | |||
| 21234 | complex_double *ap = NULL((void*)0); | |||
| 21235 | npy_intp ap_Dims[1] = {-1}; | |||
| 21236 | const int ap_Rank = 1; | |||
| 21237 | PyArrayObject *capi_ap_tmp = NULL((void*)0); | |||
| 21238 | int capi_ap_intent = 0; | |||
| 21239 | PyObject *ap_capi = Py_None(&_Py_NoneStruct); | |||
| 21240 | complex_double *x = NULL((void*)0); | |||
| 21241 | npy_intp x_Dims[1] = {-1}; | |||
| 21242 | const int x_Rank = 1; | |||
| 21243 | PyArrayObject *capi_x_tmp = NULL((void*)0); | |||
| 21244 | int capi_x_intent = 0; | |||
| 21245 | int capi_overwrite_x = 0; | |||
| 21246 | PyObject *x_capi = Py_None(&_Py_NoneStruct); | |||
| 21247 | int incx = 0; | |||
| 21248 | PyObject *incx_capi = Py_None(&_Py_NoneStruct); | |||
| 21249 | int offx = 0; | |||
| 21250 | PyObject *offx_capi = Py_None(&_Py_NoneStruct); | |||
| 21251 | int lower = 0; | |||
| 21252 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 21253 | int trans = 0; | |||
| 21254 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 21255 | int diag = 0; | |||
| 21256 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 21257 | static char *capi_kwlist[] = {"n","ap","x","incx","offx","lower","trans","diag","overwrite_x",NULL((void*)0)}; | |||
| 21258 | ||||
| 21259 | /*routdebugenter*/ | |||
| 21260 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21261 | f2py_start_clock(); | |||
| 21262 | #endif | |||
| 21263 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 21264 | "OOO|OOOOOi:_fblas.ztpmv",\ | |||
| 21265 | capi_kwlist,&n_capi,&ap_capi,&x_capi,&incx_capi,&offx_capi,&lower_capi,&trans_capi,&diag_capi,&capi_overwrite_x)) | |||
| 21266 | return NULL((void*)0); | |||
| 21267 | /*frompyobj*/ | |||
| 21268 | /* Processing variable n */ | |||
| 21269 | f2py_success = int_from_pyobj(&n,n_capi,"_fblas.ztpmv() 1st argument (n) can't be converted to int"); | |||
| 21270 | if (f2py_success) { | |||
| 21271 | CHECKSCALAR(n>=0,"n>=0","1st argument n","ztpmv:n=%d",n)if (!(n>=0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpmv:n=%d", "(""n>=0"") failed for ""1st argument n" , n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 21272 | /* Processing variable lower */ | |||
| 21273 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 21274 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztpmv() 3rd keyword (lower) can't be converted to int"); | |||
| 21275 | if (f2py_success) { | |||
| 21276 | CHECKSCALAR(lower == 0 || lower == 1,"lower == 0 || lower == 1","3rd keyword lower","ztpmv:lower=%d",lower)if (!(lower == 0 || lower == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpmv:lower=%d", "(""lower == 0 || lower == 1"") failed for " "3rd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 21277 | /* Processing variable trans */ | |||
| 21278 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 21279 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ztpmv() 4th keyword (trans) can't be converted to int"); | |||
| 21280 | if (f2py_success) { | |||
| 21281 | CHECKSCALAR(trans >= 0 || trans <= 2,"trans >= 0 || trans <= 2","4th keyword trans","ztpmv:trans=%d",trans)if (!(trans >= 0 || trans <= 2)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztpmv:trans=%d", "(""trans >= 0 || trans <= 2" ") failed for ""4th keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 21282 | /* Processing variable diag */ | |||
| 21283 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 21284 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztpmv() 5th keyword (diag) can't be converted to int"); | |||
| 21285 | if (f2py_success) { | |||
| 21286 | CHECKSCALAR(diag == 0 || diag == 1,"diag == 0 || diag == 1","5th keyword diag","ztpmv:diag=%d",diag)if (!(diag == 0 || diag == 1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpmv:diag=%d", "(""diag == 0 || diag == 1"") failed for " "5th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 21287 | /* Processing variable incx */ | |||
| 21288 | if (incx_capi == Py_None(&_Py_NoneStruct)) incx = 1; else | |||
| 21289 | f2py_success = int_from_pyobj(&incx,incx_capi,"_fblas.ztpmv() 1st keyword (incx) can't be converted to int"); | |||
| 21290 | if (f2py_success) { | |||
| 21291 | CHECKSCALAR(incx>0||incx<0,"incx>0||incx<0","1st keyword incx","ztpmv:incx=%d",incx)if (!(incx>0||incx<0)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztpmv:incx=%d", "(""incx>0||incx<0"") failed for " "1st keyword incx", incx); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 21292 | /* Processing variable offx */ | |||
| 21293 | if (offx_capi == Py_None(&_Py_NoneStruct)) offx = 0; else | |||
| 21294 | f2py_success = int_from_pyobj(&offx,offx_capi,"_fblas.ztpmv() 2nd keyword (offx) can't be converted to int"); | |||
| 21295 | if (f2py_success) { | |||
| 21296 | /* Processing variable ap */ | |||
| 21297 | ; | |||
| 21298 | capi_ap_intent |= F2PY_INTENT_IN1; | |||
| 21299 | capi_ap_tmp = array_from_pyobj(NPY_CDOUBLE,ap_Dims,ap_Rank,capi_ap_intent,ap_capi); | |||
| 21300 | if (capi_ap_tmp == NULL((void*)0)) { | |||
| 21301 | if (!PyErr_Occurred()) | |||
| 21302 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `ap' of _fblas.ztpmv to C/Fortran array" ); | |||
| 21303 | } else { | |||
| 21304 | ap = (complex_double *)(PyArray_DATA(capi_ap_tmp)((void *)((PyArrayObject_fields *)(capi_ap_tmp))->data)); | |||
| 21305 | ||||
| 21306 | CHECKARRAY(len(ap)>=(n*(n+1)/2),"len(ap)>=(n*(n+1)/2)","2nd argument ap")if (!(ap_Dims[0]>=(n*(n+1)/2))) { PyErr_SetString(_fblas_error ,"(""len(ap)>=(n*(n+1)/2)"") failed for ""2nd argument ap" ); } else { | |||
| 21307 | /* Processing variable x */ | |||
| 21308 | capi_x_intent |= (capi_overwrite_x?0:F2PY_INTENT_COPY32); | |||
| 21309 | ; | |||
| 21310 | capi_x_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 21311 | capi_x_tmp = array_from_pyobj(NPY_CDOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi); | |||
| 21312 | if (capi_x_tmp == NULL((void*)0)) { | |||
| 21313 | if (!PyErr_Occurred()) | |||
| 21314 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `x' of _fblas.ztpmv to C/Fortran array" ); | |||
| 21315 | } else { | |||
| 21316 | x = (complex_double *)(PyArray_DATA(capi_x_tmp)((void *)((PyArrayObject_fields *)(capi_x_tmp))->data)); | |||
| 21317 | ||||
| 21318 | CHECKARRAY(len(x)>offx+(n-1)*abs(incx),"len(x)>offx+(n-1)*abs(incx)","3rd argument x")if (!(x_Dims[0]>offx+(n-1)*abs(incx))) { PyErr_SetString(_fblas_error ,"(""len(x)>offx+(n-1)*abs(incx)"") failed for ""3rd argument x" ); } else { | |||
| 21319 | CHECKARRAY(offx>=0 && offx<len(x),"offx>=0 && offx<len(x)","3rd argument x")if (!(offx>=0 && offx<x_Dims[0])) { PyErr_SetString (_fblas_error,"(""offx>=0 && offx<len(x)"") failed for " "3rd argument x"); } else { | |||
| 21320 | /*end of frompyobj*/ | |||
| 21321 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21322 | f2py_start_call_clock(); | |||
| 21323 | #endif | |||
| 21324 | /*callfortranroutine*/ | |||
| 21325 | (*f2py_func)((lower?"L":"U"),(trans?(trans==2?"C":"T"):"N"),(diag?"U":"N"),&n,ap,x+offx,&incx) ; | |||
| 21326 | /*(*f2py_func)(&n,ap,x,&incx,&offx,&lower,&trans,&diag);*/ | |||
| 21327 | if (PyErr_Occurred()) | |||
| 21328 | f2py_success = 0; | |||
| 21329 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21330 | f2py_stop_call_clock(); | |||
| 21331 | #endif | |||
| 21332 | /*end of callfortranroutine*/ | |||
| 21333 | if (f2py_success) { | |||
| 21334 | /*pyobjfrom*/ | |||
| 21335 | /*end of pyobjfrom*/ | |||
| 21336 | CFUNCSMESS("Building return value.\n"); | |||
| 21337 | capi_buildvalue = Py_BuildValue("N",capi_x_tmp); | |||
| 21338 | /*closepyobjfrom*/ | |||
| 21339 | /*end of closepyobjfrom*/ | |||
| 21340 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 21341 | /*cleanupfrompyobj*/ | |||
| 21342 | } /*CHECKARRAY(offx>=0 && offx<len(x))*/ | |||
| 21343 | } /*CHECKARRAY(len(x)>offx+(n-1)*abs(incx))*/ | |||
| 21344 | } /*if (capi_x_tmp == NULL) ... else of x*/ | |||
| 21345 | /* End of cleaning variable x */ | |||
| 21346 | } /*CHECKARRAY(len(ap)>=(n*(n+1)/2))*/ | |||
| 21347 | if((PyObject *)capi_ap_tmp!=ap_capi) { | |||
| 21348 | Py_XDECREF(capi_ap_tmp)_Py_XDECREF(((PyObject*)(capi_ap_tmp))); } | |||
| 21349 | } /*if (capi_ap_tmp == NULL) ... else of ap*/ | |||
| 21350 | /* End of cleaning variable ap */ | |||
| 21351 | } /*if (f2py_success) of offx*/ | |||
| 21352 | /* End of cleaning variable offx */ | |||
| 21353 | } /*CHECKSCALAR(incx>0||incx<0)*/ | |||
| 21354 | } /*if (f2py_success) of incx*/ | |||
| 21355 | /* End of cleaning variable incx */ | |||
| 21356 | } /*CHECKSCALAR(diag == 0 || diag == 1)*/ | |||
| 21357 | } /*if (f2py_success) of diag*/ | |||
| 21358 | /* End of cleaning variable diag */ | |||
| 21359 | } /*CHECKSCALAR(trans >= 0 || trans <= 2)*/ | |||
| 21360 | } /*if (f2py_success) of trans*/ | |||
| 21361 | /* End of cleaning variable trans */ | |||
| 21362 | } /*CHECKSCALAR(lower == 0 || lower == 1)*/ | |||
| 21363 | } /*if (f2py_success) of lower*/ | |||
| 21364 | /* End of cleaning variable lower */ | |||
| 21365 | } /*CHECKSCALAR(n>=0)*/ | |||
| 21366 | } /*if (f2py_success) of n*/ | |||
| 21367 | /* End of cleaning variable n */ | |||
| 21368 | /*end of cleanupfrompyobj*/ | |||
| 21369 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 21370 | /*routdebugfailure*/ | |||
| 21371 | } else { | |||
| 21372 | /*routdebugleave*/ | |||
| 21373 | } | |||
| 21374 | CFUNCSMESS("Freeing memory.\n"); | |||
| 21375 | /*freemem*/ | |||
| 21376 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21377 | f2py_stop_clock(); | |||
| 21378 | #endif | |||
| 21379 | return capi_buildvalue; | |||
| 21380 | } | |||
| 21381 | /******************************** end of ztpmv ********************************/ | |||
| 21382 | ||||
| 21383 | /*********************************** sgemm ***********************************/ | |||
| 21384 | static char doc_f2py_rout__fblas_sgemm[] = "\ | |||
| 21385 | c = sgemm(alpha,a,b,[beta,c,trans_a,trans_b,overwrite_c])\n\nWrapper for ``sgemm``.\ | |||
| 21386 | \n\nParameters\n----------\n" | |||
| 21387 | "alpha : input float\n" | |||
| 21388 | "a : input rank-2 array('f') with bounds (lda,ka)\n" | |||
| 21389 | "b : input rank-2 array('f') with bounds (ldb,kb)\n" | |||
| 21390 | "\nOther Parameters\n----------------\n" | |||
| 21391 | "beta : input float, optional\n Default: 0.0\n" | |||
| 21392 | "c : input rank-2 array('f') with bounds (m,n)\n" | |||
| 21393 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 21394 | "trans_a : input int, optional\n Default: 0\n" | |||
| 21395 | "trans_b : input int, optional\n Default: 0\n" | |||
| 21396 | "\nReturns\n-------\n" | |||
| 21397 | "c : rank-2 array('f') with bounds (m,n)"; | |||
| 21398 | /* extern void F_FUNC(sgemm,SGEMM)(char*,char*,F_INT*,F_INT*,F_INT*,float*,float*,F_INT*,float*, F_INT*,float*,float*,F_INT* ); */ | |||
| 21399 | static PyObject *f2py_rout__fblas_sgemm(const PyObject *capi_self, | |||
| 21400 | PyObject *capi_args, | |||
| 21401 | PyObject *capi_keywds, | |||
| 21402 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*, F_INTint*,float*,float*,F_INTint* )) { | |||
| 21403 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 21404 | volatile int f2py_success = 1; | |||
| 21405 | /*decl*/ | |||
| 21406 | ||||
| 21407 | int m = 0; | |||
| 21408 | int n = 0; | |||
| 21409 | int k = 0; | |||
| 21410 | float alpha = 0; | |||
| 21411 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 21412 | float *a = NULL((void*)0); | |||
| 21413 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 21414 | const int a_Rank = 2; | |||
| 21415 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 21416 | int capi_a_intent = 0; | |||
| 21417 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 21418 | float *b = NULL((void*)0); | |||
| 21419 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 21420 | const int b_Rank = 2; | |||
| 21421 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 21422 | int capi_b_intent = 0; | |||
| 21423 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 21424 | float beta = 0; | |||
| 21425 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 21426 | float *c = NULL((void*)0); | |||
| 21427 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 21428 | const int c_Rank = 2; | |||
| 21429 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 21430 | int capi_c_intent = 0; | |||
| 21431 | int capi_overwrite_c = 0; | |||
| 21432 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 21433 | int trans_a = 0; | |||
| 21434 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 21435 | int trans_b = 0; | |||
| 21436 | PyObject *trans_b_capi = Py_None(&_Py_NoneStruct); | |||
| 21437 | int lda = 0; | |||
| 21438 | int ka = 0; | |||
| 21439 | int ldb = 0; | |||
| 21440 | int kb = 0; | |||
| 21441 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans_a","trans_b","overwrite_c",NULL((void*)0)}; | |||
| 21442 | ||||
| 21443 | /*routdebugenter*/ | |||
| 21444 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21445 | f2py_start_clock(); | |||
| 21446 | #endif | |||
| 21447 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 21448 | "OOO|OOOOi:_fblas.sgemm",\ | |||
| 21449 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_a_capi,&trans_b_capi,&capi_overwrite_c)) | |||
| 21450 | return NULL((void*)0); | |||
| 21451 | /*frompyobj*/ | |||
| 21452 | /* Processing variable trans_a */ | |||
| 21453 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 21454 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.sgemm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 21455 | if (f2py_success) { | |||
| 21456 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","sgemm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sgemm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 21457 | /* Processing variable trans_b */ | |||
| 21458 | if (trans_b_capi == Py_None(&_Py_NoneStruct)) trans_b = 0; else | |||
| 21459 | f2py_success = int_from_pyobj(&trans_b,trans_b_capi,"_fblas.sgemm() 4th keyword (trans_b) can't be converted to int"); | |||
| 21460 | if (f2py_success) { | |||
| 21461 | CHECKSCALAR(trans_b>=0 && trans_b <=2,"trans_b>=0 && trans_b <=2","4th keyword trans_b","sgemm:trans_b=%d",trans_b)if (!(trans_b>=0 && trans_b <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""sgemm:trans_b=%d", "(""trans_b>=0 && trans_b <=2" ") failed for ""4th keyword trans_b", trans_b); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 21462 | /* Processing variable alpha */ | |||
| 21463 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.sgemm() 1st argument (alpha) can't be converted to float"); | |||
| 21464 | if (f2py_success) { | |||
| 21465 | /* Processing variable beta */ | |||
| 21466 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 21467 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.sgemm() 1st keyword (beta) can't be converted to float"); | |||
| 21468 | if (f2py_success) { | |||
| 21469 | /* Processing variable a */ | |||
| 21470 | ; | |||
| 21471 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 21472 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 21473 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 21474 | if (!PyErr_Occurred()) | |||
| 21475 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.sgemm to C/Fortran array" ); | |||
| 21476 | } else { | |||
| 21477 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 21478 | ||||
| 21479 | /* Processing variable b */ | |||
| 21480 | ; | |||
| 21481 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 21482 | capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 21483 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 21484 | if (!PyErr_Occurred()) | |||
| 21485 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.sgemm to C/Fortran array" ); | |||
| 21486 | } else { | |||
| 21487 | b = (float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 21488 | ||||
| 21489 | /* Processing variable lda */ | |||
| 21490 | lda = shape(a,0)a_Dims[0]; | |||
| 21491 | /* Processing variable ka */ | |||
| 21492 | ka = shape(a,1)a_Dims[1]; | |||
| 21493 | /* Processing variable ldb */ | |||
| 21494 | ldb = shape(b,0)b_Dims[0]; | |||
| 21495 | /* Processing variable kb */ | |||
| 21496 | kb = shape(b,1)b_Dims[1]; | |||
| 21497 | /* Processing variable m */ | |||
| 21498 | m = (trans_a?ka:lda); | |||
| 21499 | /* Processing variable k */ | |||
| 21500 | k = (trans_a?lda:ka); | |||
| 21501 | /* Processing variable n */ | |||
| 21502 | n = (trans_b?ldb:kb); | |||
| 21503 | CHECKSCALAR(trans_b?kb==k:ldb==k,"trans_b?kb==k:ldb==k","hidden n","sgemm:n=%d",n)if (!(trans_b?kb==k:ldb==k)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""sgemm:n=%d", "(""trans_b?kb==k:ldb==k"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 21504 | /* Processing variable c */ | |||
| 21505 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 21506 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 21507 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 21508 | capi_c_tmp = array_from_pyobj(NPY_FLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 21509 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 21510 | if (!PyErr_Occurred()) | |||
| 21511 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.sgemm to C/Fortran array" ); | |||
| 21512 | } else { | |||
| 21513 | c = (float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 21514 | ||||
| 21515 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 21516 | /*end of frompyobj*/ | |||
| 21517 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21518 | f2py_start_call_clock(); | |||
| 21519 | #endif | |||
| 21520 | /*callfortranroutine*/ | |||
| 21521 | (*f2py_func)((trans_a?(trans_a==2?"C":"T"):"N"), (trans_b?(trans_b==2?"C":"T"):"N"),&m,&n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 21522 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&beta,c,&trans_a,&trans_b,&lda,&ka,&ldb,&kb);*/ | |||
| 21523 | if (PyErr_Occurred()) | |||
| 21524 | f2py_success = 0; | |||
| 21525 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21526 | f2py_stop_call_clock(); | |||
| 21527 | #endif | |||
| 21528 | /*end of callfortranroutine*/ | |||
| 21529 | if (f2py_success) { | |||
| 21530 | /*pyobjfrom*/ | |||
| 21531 | /*end of pyobjfrom*/ | |||
| 21532 | CFUNCSMESS("Building return value.\n"); | |||
| 21533 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 21534 | /*closepyobjfrom*/ | |||
| 21535 | /*end of closepyobjfrom*/ | |||
| 21536 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 21537 | /*cleanupfrompyobj*/ | |||
| 21538 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 21539 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 21540 | /* End of cleaning variable c */ | |||
| 21541 | } /*CHECKSCALAR(trans_b?kb==k:ldb==k)*/ | |||
| 21542 | /* End of cleaning variable n */ | |||
| 21543 | /* End of cleaning variable k */ | |||
| 21544 | /* End of cleaning variable m */ | |||
| 21545 | /* End of cleaning variable kb */ | |||
| 21546 | /* End of cleaning variable ldb */ | |||
| 21547 | /* End of cleaning variable ka */ | |||
| 21548 | /* End of cleaning variable lda */ | |||
| 21549 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 21550 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 21551 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 21552 | /* End of cleaning variable b */ | |||
| 21553 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 21554 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 21555 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 21556 | /* End of cleaning variable a */ | |||
| 21557 | } /*if (f2py_success) of beta*/ | |||
| 21558 | /* End of cleaning variable beta */ | |||
| 21559 | } /*if (f2py_success) of alpha*/ | |||
| 21560 | /* End of cleaning variable alpha */ | |||
| 21561 | } /*CHECKSCALAR(trans_b>=0 && trans_b <=2)*/ | |||
| 21562 | } /*if (f2py_success) of trans_b*/ | |||
| 21563 | /* End of cleaning variable trans_b */ | |||
| 21564 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 21565 | } /*if (f2py_success) of trans_a*/ | |||
| 21566 | /* End of cleaning variable trans_a */ | |||
| 21567 | /*end of cleanupfrompyobj*/ | |||
| 21568 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 21569 | /*routdebugfailure*/ | |||
| 21570 | } else { | |||
| 21571 | /*routdebugleave*/ | |||
| 21572 | } | |||
| 21573 | CFUNCSMESS("Freeing memory.\n"); | |||
| 21574 | /*freemem*/ | |||
| 21575 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21576 | f2py_stop_clock(); | |||
| 21577 | #endif | |||
| 21578 | return capi_buildvalue; | |||
| 21579 | } | |||
| 21580 | /******************************** end of sgemm ********************************/ | |||
| 21581 | ||||
| 21582 | /*********************************** dgemm ***********************************/ | |||
| 21583 | static char doc_f2py_rout__fblas_dgemm[] = "\ | |||
| 21584 | c = dgemm(alpha,a,b,[beta,c,trans_a,trans_b,overwrite_c])\n\nWrapper for ``dgemm``.\ | |||
| 21585 | \n\nParameters\n----------\n" | |||
| 21586 | "alpha : input float\n" | |||
| 21587 | "a : input rank-2 array('d') with bounds (lda,ka)\n" | |||
| 21588 | "b : input rank-2 array('d') with bounds (ldb,kb)\n" | |||
| 21589 | "\nOther Parameters\n----------------\n" | |||
| 21590 | "beta : input float, optional\n Default: 0.0\n" | |||
| 21591 | "c : input rank-2 array('d') with bounds (m,n)\n" | |||
| 21592 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 21593 | "trans_a : input int, optional\n Default: 0\n" | |||
| 21594 | "trans_b : input int, optional\n Default: 0\n" | |||
| 21595 | "\nReturns\n-------\n" | |||
| 21596 | "c : rank-2 array('d') with bounds (m,n)"; | |||
| 21597 | /* extern void F_FUNC(dgemm,DGEMM)(char*,char*,F_INT*,F_INT*,F_INT*,double*,double*,F_INT*,double*, F_INT*,double*,double*,F_INT* ); */ | |||
| 21598 | static PyObject *f2py_rout__fblas_dgemm(const PyObject *capi_self, | |||
| 21599 | PyObject *capi_args, | |||
| 21600 | PyObject *capi_keywds, | |||
| 21601 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*, F_INTint*,double*,double*,F_INTint* )) { | |||
| 21602 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 21603 | volatile int f2py_success = 1; | |||
| 21604 | /*decl*/ | |||
| 21605 | ||||
| 21606 | int m = 0; | |||
| 21607 | int n = 0; | |||
| 21608 | int k = 0; | |||
| 21609 | double alpha = 0; | |||
| 21610 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 21611 | double *a = NULL((void*)0); | |||
| 21612 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 21613 | const int a_Rank = 2; | |||
| 21614 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 21615 | int capi_a_intent = 0; | |||
| 21616 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 21617 | double *b = NULL((void*)0); | |||
| 21618 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 21619 | const int b_Rank = 2; | |||
| 21620 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 21621 | int capi_b_intent = 0; | |||
| 21622 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 21623 | double beta = 0; | |||
| 21624 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 21625 | double *c = NULL((void*)0); | |||
| 21626 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 21627 | const int c_Rank = 2; | |||
| 21628 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 21629 | int capi_c_intent = 0; | |||
| 21630 | int capi_overwrite_c = 0; | |||
| 21631 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 21632 | int trans_a = 0; | |||
| 21633 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 21634 | int trans_b = 0; | |||
| 21635 | PyObject *trans_b_capi = Py_None(&_Py_NoneStruct); | |||
| 21636 | int lda = 0; | |||
| 21637 | int ka = 0; | |||
| 21638 | int ldb = 0; | |||
| 21639 | int kb = 0; | |||
| 21640 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans_a","trans_b","overwrite_c",NULL((void*)0)}; | |||
| 21641 | ||||
| 21642 | /*routdebugenter*/ | |||
| 21643 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21644 | f2py_start_clock(); | |||
| 21645 | #endif | |||
| 21646 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 21647 | "OOO|OOOOi:_fblas.dgemm",\ | |||
| 21648 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_a_capi,&trans_b_capi,&capi_overwrite_c)) | |||
| 21649 | return NULL((void*)0); | |||
| 21650 | /*frompyobj*/ | |||
| 21651 | /* Processing variable trans_a */ | |||
| 21652 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 21653 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.dgemm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 21654 | if (f2py_success) { | |||
| 21655 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","dgemm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dgemm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 21656 | /* Processing variable trans_b */ | |||
| 21657 | if (trans_b_capi == Py_None(&_Py_NoneStruct)) trans_b = 0; else | |||
| 21658 | f2py_success = int_from_pyobj(&trans_b,trans_b_capi,"_fblas.dgemm() 4th keyword (trans_b) can't be converted to int"); | |||
| 21659 | if (f2py_success) { | |||
| 21660 | CHECKSCALAR(trans_b>=0 && trans_b <=2,"trans_b>=0 && trans_b <=2","4th keyword trans_b","dgemm:trans_b=%d",trans_b)if (!(trans_b>=0 && trans_b <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dgemm:trans_b=%d", "(""trans_b>=0 && trans_b <=2" ") failed for ""4th keyword trans_b", trans_b); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 21661 | /* Processing variable alpha */ | |||
| 21662 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dgemm() 1st argument (alpha) can't be converted to double"); | |||
| 21663 | if (f2py_success) { | |||
| 21664 | /* Processing variable beta */ | |||
| 21665 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 21666 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dgemm() 1st keyword (beta) can't be converted to double"); | |||
| 21667 | if (f2py_success) { | |||
| 21668 | /* Processing variable a */ | |||
| 21669 | ; | |||
| 21670 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 21671 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 21672 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 21673 | if (!PyErr_Occurred()) | |||
| 21674 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dgemm to C/Fortran array" ); | |||
| 21675 | } else { | |||
| 21676 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 21677 | ||||
| 21678 | /* Processing variable b */ | |||
| 21679 | ; | |||
| 21680 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 21681 | capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 21682 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 21683 | if (!PyErr_Occurred()) | |||
| 21684 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.dgemm to C/Fortran array" ); | |||
| 21685 | } else { | |||
| 21686 | b = (double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 21687 | ||||
| 21688 | /* Processing variable lda */ | |||
| 21689 | lda = shape(a,0)a_Dims[0]; | |||
| 21690 | /* Processing variable ka */ | |||
| 21691 | ka = shape(a,1)a_Dims[1]; | |||
| 21692 | /* Processing variable ldb */ | |||
| 21693 | ldb = shape(b,0)b_Dims[0]; | |||
| 21694 | /* Processing variable kb */ | |||
| 21695 | kb = shape(b,1)b_Dims[1]; | |||
| 21696 | /* Processing variable m */ | |||
| 21697 | m = (trans_a?ka:lda); | |||
| 21698 | /* Processing variable k */ | |||
| 21699 | k = (trans_a?lda:ka); | |||
| 21700 | /* Processing variable n */ | |||
| 21701 | n = (trans_b?ldb:kb); | |||
| 21702 | CHECKSCALAR(trans_b?kb==k:ldb==k,"trans_b?kb==k:ldb==k","hidden n","dgemm:n=%d",n)if (!(trans_b?kb==k:ldb==k)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dgemm:n=%d", "(""trans_b?kb==k:ldb==k"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 21703 | /* Processing variable c */ | |||
| 21704 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 21705 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 21706 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 21707 | capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 21708 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 21709 | if (!PyErr_Occurred()) | |||
| 21710 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.dgemm to C/Fortran array" ); | |||
| 21711 | } else { | |||
| 21712 | c = (double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 21713 | ||||
| 21714 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 21715 | /*end of frompyobj*/ | |||
| 21716 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21717 | f2py_start_call_clock(); | |||
| 21718 | #endif | |||
| 21719 | /*callfortranroutine*/ | |||
| 21720 | (*f2py_func)((trans_a?(trans_a==2?"C":"T"):"N"), (trans_b?(trans_b==2?"C":"T"):"N"),&m,&n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 21721 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&beta,c,&trans_a,&trans_b,&lda,&ka,&ldb,&kb);*/ | |||
| 21722 | if (PyErr_Occurred()) | |||
| 21723 | f2py_success = 0; | |||
| 21724 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21725 | f2py_stop_call_clock(); | |||
| 21726 | #endif | |||
| 21727 | /*end of callfortranroutine*/ | |||
| 21728 | if (f2py_success) { | |||
| 21729 | /*pyobjfrom*/ | |||
| 21730 | /*end of pyobjfrom*/ | |||
| 21731 | CFUNCSMESS("Building return value.\n"); | |||
| 21732 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 21733 | /*closepyobjfrom*/ | |||
| 21734 | /*end of closepyobjfrom*/ | |||
| 21735 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 21736 | /*cleanupfrompyobj*/ | |||
| 21737 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 21738 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 21739 | /* End of cleaning variable c */ | |||
| 21740 | } /*CHECKSCALAR(trans_b?kb==k:ldb==k)*/ | |||
| 21741 | /* End of cleaning variable n */ | |||
| 21742 | /* End of cleaning variable k */ | |||
| 21743 | /* End of cleaning variable m */ | |||
| 21744 | /* End of cleaning variable kb */ | |||
| 21745 | /* End of cleaning variable ldb */ | |||
| 21746 | /* End of cleaning variable ka */ | |||
| 21747 | /* End of cleaning variable lda */ | |||
| 21748 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 21749 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 21750 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 21751 | /* End of cleaning variable b */ | |||
| 21752 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 21753 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 21754 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 21755 | /* End of cleaning variable a */ | |||
| 21756 | } /*if (f2py_success) of beta*/ | |||
| 21757 | /* End of cleaning variable beta */ | |||
| 21758 | } /*if (f2py_success) of alpha*/ | |||
| 21759 | /* End of cleaning variable alpha */ | |||
| 21760 | } /*CHECKSCALAR(trans_b>=0 && trans_b <=2)*/ | |||
| 21761 | } /*if (f2py_success) of trans_b*/ | |||
| 21762 | /* End of cleaning variable trans_b */ | |||
| 21763 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 21764 | } /*if (f2py_success) of trans_a*/ | |||
| 21765 | /* End of cleaning variable trans_a */ | |||
| 21766 | /*end of cleanupfrompyobj*/ | |||
| 21767 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 21768 | /*routdebugfailure*/ | |||
| 21769 | } else { | |||
| 21770 | /*routdebugleave*/ | |||
| 21771 | } | |||
| 21772 | CFUNCSMESS("Freeing memory.\n"); | |||
| 21773 | /*freemem*/ | |||
| 21774 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21775 | f2py_stop_clock(); | |||
| 21776 | #endif | |||
| 21777 | return capi_buildvalue; | |||
| 21778 | } | |||
| 21779 | /******************************** end of dgemm ********************************/ | |||
| 21780 | ||||
| 21781 | /*********************************** cgemm ***********************************/ | |||
| 21782 | static char doc_f2py_rout__fblas_cgemm[] = "\ | |||
| 21783 | c = cgemm(alpha,a,b,[beta,c,trans_a,trans_b,overwrite_c])\n\nWrapper for ``cgemm``.\ | |||
| 21784 | \n\nParameters\n----------\n" | |||
| 21785 | "alpha : input complex\n" | |||
| 21786 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 21787 | "b : input rank-2 array('F') with bounds (ldb,kb)\n" | |||
| 21788 | "\nOther Parameters\n----------------\n" | |||
| 21789 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 21790 | "c : input rank-2 array('F') with bounds (m,n)\n" | |||
| 21791 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 21792 | "trans_a : input int, optional\n Default: 0\n" | |||
| 21793 | "trans_b : input int, optional\n Default: 0\n" | |||
| 21794 | "\nReturns\n-------\n" | |||
| 21795 | "c : rank-2 array('F') with bounds (m,n)"; | |||
| 21796 | /* extern void F_FUNC(cgemm,CGEMM)(char*,char*,F_INT*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*, F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 21797 | static PyObject *f2py_rout__fblas_cgemm(const PyObject *capi_self, | |||
| 21798 | PyObject *capi_args, | |||
| 21799 | PyObject *capi_keywds, | |||
| 21800 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 21801 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 21802 | volatile int f2py_success = 1; | |||
| 21803 | /*decl*/ | |||
| 21804 | ||||
| 21805 | int m = 0; | |||
| 21806 | int n = 0; | |||
| 21807 | int k = 0; | |||
| 21808 | complex_float alpha; | |||
| 21809 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 21810 | complex_float *a = NULL((void*)0); | |||
| 21811 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 21812 | const int a_Rank = 2; | |||
| 21813 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 21814 | int capi_a_intent = 0; | |||
| 21815 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 21816 | complex_float *b = NULL((void*)0); | |||
| 21817 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 21818 | const int b_Rank = 2; | |||
| 21819 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 21820 | int capi_b_intent = 0; | |||
| 21821 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 21822 | complex_float beta; | |||
| 21823 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 21824 | complex_float *c = NULL((void*)0); | |||
| 21825 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 21826 | const int c_Rank = 2; | |||
| 21827 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 21828 | int capi_c_intent = 0; | |||
| 21829 | int capi_overwrite_c = 0; | |||
| 21830 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 21831 | int trans_a = 0; | |||
| 21832 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 21833 | int trans_b = 0; | |||
| 21834 | PyObject *trans_b_capi = Py_None(&_Py_NoneStruct); | |||
| 21835 | int lda = 0; | |||
| 21836 | int ka = 0; | |||
| 21837 | int ldb = 0; | |||
| 21838 | int kb = 0; | |||
| 21839 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans_a","trans_b","overwrite_c",NULL((void*)0)}; | |||
| 21840 | ||||
| 21841 | /*routdebugenter*/ | |||
| 21842 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21843 | f2py_start_clock(); | |||
| 21844 | #endif | |||
| 21845 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 21846 | "OOO|OOOOi:_fblas.cgemm",\ | |||
| 21847 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_a_capi,&trans_b_capi,&capi_overwrite_c)) | |||
| 21848 | return NULL((void*)0); | |||
| 21849 | /*frompyobj*/ | |||
| 21850 | /* Processing variable trans_a */ | |||
| 21851 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 21852 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.cgemm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 21853 | if (f2py_success) { | |||
| 21854 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","cgemm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cgemm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 21855 | /* Processing variable trans_b */ | |||
| 21856 | if (trans_b_capi == Py_None(&_Py_NoneStruct)) trans_b = 0; else | |||
| 21857 | f2py_success = int_from_pyobj(&trans_b,trans_b_capi,"_fblas.cgemm() 4th keyword (trans_b) can't be converted to int"); | |||
| 21858 | if (f2py_success) { | |||
| 21859 | CHECKSCALAR(trans_b>=0 && trans_b <=2,"trans_b>=0 && trans_b <=2","4th keyword trans_b","cgemm:trans_b=%d",trans_b)if (!(trans_b>=0 && trans_b <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cgemm:trans_b=%d", "(""trans_b>=0 && trans_b <=2" ") failed for ""4th keyword trans_b", trans_b); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 21860 | /* Processing variable alpha */ | |||
| 21861 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cgemm() 1st argument (alpha) can't be converted to complex_float"); | |||
| 21862 | if (f2py_success) { | |||
| 21863 | /* Processing variable beta */ | |||
| 21864 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 21865 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.cgemm() 1st keyword (beta) can't be converted to complex_float"); | |||
| 21866 | if (f2py_success) { | |||
| 21867 | /* Processing variable a */ | |||
| 21868 | ; | |||
| 21869 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 21870 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 21871 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 21872 | if (!PyErr_Occurred()) | |||
| 21873 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.cgemm to C/Fortran array" ); | |||
| 21874 | } else { | |||
| 21875 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 21876 | ||||
| 21877 | /* Processing variable b */ | |||
| 21878 | ; | |||
| 21879 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 21880 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 21881 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 21882 | if (!PyErr_Occurred()) | |||
| 21883 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.cgemm to C/Fortran array" ); | |||
| 21884 | } else { | |||
| 21885 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 21886 | ||||
| 21887 | /* Processing variable lda */ | |||
| 21888 | lda = shape(a,0)a_Dims[0]; | |||
| 21889 | /* Processing variable ka */ | |||
| 21890 | ka = shape(a,1)a_Dims[1]; | |||
| 21891 | /* Processing variable ldb */ | |||
| 21892 | ldb = shape(b,0)b_Dims[0]; | |||
| 21893 | /* Processing variable kb */ | |||
| 21894 | kb = shape(b,1)b_Dims[1]; | |||
| 21895 | /* Processing variable m */ | |||
| 21896 | m = (trans_a?ka:lda); | |||
| 21897 | /* Processing variable k */ | |||
| 21898 | k = (trans_a?lda:ka); | |||
| 21899 | /* Processing variable n */ | |||
| 21900 | n = (trans_b?ldb:kb); | |||
| 21901 | CHECKSCALAR(trans_b?kb==k:ldb==k,"trans_b?kb==k:ldb==k","hidden n","cgemm:n=%d",n)if (!(trans_b?kb==k:ldb==k)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cgemm:n=%d", "(""trans_b?kb==k:ldb==k"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 21902 | /* Processing variable c */ | |||
| 21903 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 21904 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 21905 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 21906 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 21907 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 21908 | if (!PyErr_Occurred()) | |||
| 21909 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.cgemm to C/Fortran array" ); | |||
| 21910 | } else { | |||
| 21911 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 21912 | ||||
| 21913 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 21914 | /*end of frompyobj*/ | |||
| 21915 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21916 | f2py_start_call_clock(); | |||
| 21917 | #endif | |||
| 21918 | /*callfortranroutine*/ | |||
| 21919 | (*f2py_func)((trans_a?(trans_a==2?"C":"T"):"N"), (trans_b?(trans_b==2?"C":"T"):"N"),&m,&n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 21920 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&beta,c,&trans_a,&trans_b,&lda,&ka,&ldb,&kb);*/ | |||
| 21921 | if (PyErr_Occurred()) | |||
| 21922 | f2py_success = 0; | |||
| 21923 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21924 | f2py_stop_call_clock(); | |||
| 21925 | #endif | |||
| 21926 | /*end of callfortranroutine*/ | |||
| 21927 | if (f2py_success) { | |||
| 21928 | /*pyobjfrom*/ | |||
| 21929 | /*end of pyobjfrom*/ | |||
| 21930 | CFUNCSMESS("Building return value.\n"); | |||
| 21931 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 21932 | /*closepyobjfrom*/ | |||
| 21933 | /*end of closepyobjfrom*/ | |||
| 21934 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 21935 | /*cleanupfrompyobj*/ | |||
| 21936 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 21937 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 21938 | /* End of cleaning variable c */ | |||
| 21939 | } /*CHECKSCALAR(trans_b?kb==k:ldb==k)*/ | |||
| 21940 | /* End of cleaning variable n */ | |||
| 21941 | /* End of cleaning variable k */ | |||
| 21942 | /* End of cleaning variable m */ | |||
| 21943 | /* End of cleaning variable kb */ | |||
| 21944 | /* End of cleaning variable ldb */ | |||
| 21945 | /* End of cleaning variable ka */ | |||
| 21946 | /* End of cleaning variable lda */ | |||
| 21947 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 21948 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 21949 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 21950 | /* End of cleaning variable b */ | |||
| 21951 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 21952 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 21953 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 21954 | /* End of cleaning variable a */ | |||
| 21955 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 21956 | /* End of cleaning variable beta */ | |||
| 21957 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 21958 | /* End of cleaning variable alpha */ | |||
| 21959 | } /*CHECKSCALAR(trans_b>=0 && trans_b <=2)*/ | |||
| 21960 | } /*if (f2py_success) of trans_b*/ | |||
| 21961 | /* End of cleaning variable trans_b */ | |||
| 21962 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 21963 | } /*if (f2py_success) of trans_a*/ | |||
| 21964 | /* End of cleaning variable trans_a */ | |||
| 21965 | /*end of cleanupfrompyobj*/ | |||
| 21966 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 21967 | /*routdebugfailure*/ | |||
| 21968 | } else { | |||
| 21969 | /*routdebugleave*/ | |||
| 21970 | } | |||
| 21971 | CFUNCSMESS("Freeing memory.\n"); | |||
| 21972 | /*freemem*/ | |||
| 21973 | #ifdef F2PY_REPORT_ATEXIT | |||
| 21974 | f2py_stop_clock(); | |||
| 21975 | #endif | |||
| 21976 | return capi_buildvalue; | |||
| 21977 | } | |||
| 21978 | /******************************** end of cgemm ********************************/ | |||
| 21979 | ||||
| 21980 | /*********************************** zgemm ***********************************/ | |||
| 21981 | static char doc_f2py_rout__fblas_zgemm[] = "\ | |||
| 21982 | c = zgemm(alpha,a,b,[beta,c,trans_a,trans_b,overwrite_c])\n\nWrapper for ``zgemm``.\ | |||
| 21983 | \n\nParameters\n----------\n" | |||
| 21984 | "alpha : input complex\n" | |||
| 21985 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 21986 | "b : input rank-2 array('D') with bounds (ldb,kb)\n" | |||
| 21987 | "\nOther Parameters\n----------------\n" | |||
| 21988 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 21989 | "c : input rank-2 array('D') with bounds (m,n)\n" | |||
| 21990 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 21991 | "trans_a : input int, optional\n Default: 0\n" | |||
| 21992 | "trans_b : input int, optional\n Default: 0\n" | |||
| 21993 | "\nReturns\n-------\n" | |||
| 21994 | "c : rank-2 array('D') with bounds (m,n)"; | |||
| 21995 | /* extern void F_FUNC(zgemm,ZGEMM)(char*,char*,F_INT*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*, F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 21996 | static PyObject *f2py_rout__fblas_zgemm(const PyObject *capi_self, | |||
| 21997 | PyObject *capi_args, | |||
| 21998 | PyObject *capi_keywds, | |||
| 21999 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 22000 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 22001 | volatile int f2py_success = 1; | |||
| 22002 | /*decl*/ | |||
| 22003 | ||||
| 22004 | int m = 0; | |||
| 22005 | int n = 0; | |||
| 22006 | int k = 0; | |||
| 22007 | complex_double alpha; | |||
| 22008 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 22009 | complex_double *a = NULL((void*)0); | |||
| 22010 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 22011 | const int a_Rank = 2; | |||
| 22012 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 22013 | int capi_a_intent = 0; | |||
| 22014 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 22015 | complex_double *b = NULL((void*)0); | |||
| 22016 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 22017 | const int b_Rank = 2; | |||
| 22018 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 22019 | int capi_b_intent = 0; | |||
| 22020 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 22021 | complex_double beta; | |||
| 22022 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 22023 | complex_double *c = NULL((void*)0); | |||
| 22024 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 22025 | const int c_Rank = 2; | |||
| 22026 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 22027 | int capi_c_intent = 0; | |||
| 22028 | int capi_overwrite_c = 0; | |||
| 22029 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 22030 | int trans_a = 0; | |||
| 22031 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 22032 | int trans_b = 0; | |||
| 22033 | PyObject *trans_b_capi = Py_None(&_Py_NoneStruct); | |||
| 22034 | int lda = 0; | |||
| 22035 | int ka = 0; | |||
| 22036 | int ldb = 0; | |||
| 22037 | int kb = 0; | |||
| 22038 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans_a","trans_b","overwrite_c",NULL((void*)0)}; | |||
| 22039 | ||||
| 22040 | /*routdebugenter*/ | |||
| 22041 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22042 | f2py_start_clock(); | |||
| 22043 | #endif | |||
| 22044 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 22045 | "OOO|OOOOi:_fblas.zgemm",\ | |||
| 22046 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_a_capi,&trans_b_capi,&capi_overwrite_c)) | |||
| 22047 | return NULL((void*)0); | |||
| 22048 | /*frompyobj*/ | |||
| 22049 | /* Processing variable trans_a */ | |||
| 22050 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 22051 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.zgemm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 22052 | if (f2py_success) { | |||
| 22053 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","zgemm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zgemm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 22054 | /* Processing variable trans_b */ | |||
| 22055 | if (trans_b_capi == Py_None(&_Py_NoneStruct)) trans_b = 0; else | |||
| 22056 | f2py_success = int_from_pyobj(&trans_b,trans_b_capi,"_fblas.zgemm() 4th keyword (trans_b) can't be converted to int"); | |||
| 22057 | if (f2py_success) { | |||
| 22058 | CHECKSCALAR(trans_b>=0 && trans_b <=2,"trans_b>=0 && trans_b <=2","4th keyword trans_b","zgemm:trans_b=%d",trans_b)if (!(trans_b>=0 && trans_b <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zgemm:trans_b=%d", "(""trans_b>=0 && trans_b <=2" ") failed for ""4th keyword trans_b", trans_b); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 22059 | /* Processing variable alpha */ | |||
| 22060 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zgemm() 1st argument (alpha) can't be converted to complex_double"); | |||
| 22061 | if (f2py_success) { | |||
| 22062 | /* Processing variable beta */ | |||
| 22063 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 22064 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zgemm() 1st keyword (beta) can't be converted to complex_double"); | |||
| 22065 | if (f2py_success) { | |||
| 22066 | /* Processing variable a */ | |||
| 22067 | ; | |||
| 22068 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 22069 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 22070 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 22071 | if (!PyErr_Occurred()) | |||
| 22072 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zgemm to C/Fortran array" ); | |||
| 22073 | } else { | |||
| 22074 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 22075 | ||||
| 22076 | /* Processing variable b */ | |||
| 22077 | ; | |||
| 22078 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 22079 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 22080 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 22081 | if (!PyErr_Occurred()) | |||
| 22082 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.zgemm to C/Fortran array" ); | |||
| 22083 | } else { | |||
| 22084 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 22085 | ||||
| 22086 | /* Processing variable lda */ | |||
| 22087 | lda = shape(a,0)a_Dims[0]; | |||
| 22088 | /* Processing variable ka */ | |||
| 22089 | ka = shape(a,1)a_Dims[1]; | |||
| 22090 | /* Processing variable ldb */ | |||
| 22091 | ldb = shape(b,0)b_Dims[0]; | |||
| 22092 | /* Processing variable kb */ | |||
| 22093 | kb = shape(b,1)b_Dims[1]; | |||
| 22094 | /* Processing variable m */ | |||
| 22095 | m = (trans_a?ka:lda); | |||
| 22096 | /* Processing variable k */ | |||
| 22097 | k = (trans_a?lda:ka); | |||
| 22098 | /* Processing variable n */ | |||
| 22099 | n = (trans_b?ldb:kb); | |||
| 22100 | CHECKSCALAR(trans_b?kb==k:ldb==k,"trans_b?kb==k:ldb==k","hidden n","zgemm:n=%d",n)if (!(trans_b?kb==k:ldb==k)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zgemm:n=%d", "(""trans_b?kb==k:ldb==k"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 22101 | /* Processing variable c */ | |||
| 22102 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 22103 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 22104 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 22105 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 22106 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 22107 | if (!PyErr_Occurred()) | |||
| 22108 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zgemm to C/Fortran array" ); | |||
| 22109 | } else { | |||
| 22110 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 22111 | ||||
| 22112 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 22113 | /*end of frompyobj*/ | |||
| 22114 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22115 | f2py_start_call_clock(); | |||
| 22116 | #endif | |||
| 22117 | /*callfortranroutine*/ | |||
| 22118 | (*f2py_func)((trans_a?(trans_a==2?"C":"T"):"N"), (trans_b?(trans_b==2?"C":"T"):"N"),&m,&n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 22119 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&beta,c,&trans_a,&trans_b,&lda,&ka,&ldb,&kb);*/ | |||
| 22120 | if (PyErr_Occurred()) | |||
| 22121 | f2py_success = 0; | |||
| 22122 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22123 | f2py_stop_call_clock(); | |||
| 22124 | #endif | |||
| 22125 | /*end of callfortranroutine*/ | |||
| 22126 | if (f2py_success) { | |||
| 22127 | /*pyobjfrom*/ | |||
| 22128 | /*end of pyobjfrom*/ | |||
| 22129 | CFUNCSMESS("Building return value.\n"); | |||
| 22130 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 22131 | /*closepyobjfrom*/ | |||
| 22132 | /*end of closepyobjfrom*/ | |||
| 22133 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 22134 | /*cleanupfrompyobj*/ | |||
| 22135 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 22136 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 22137 | /* End of cleaning variable c */ | |||
| 22138 | } /*CHECKSCALAR(trans_b?kb==k:ldb==k)*/ | |||
| 22139 | /* End of cleaning variable n */ | |||
| 22140 | /* End of cleaning variable k */ | |||
| 22141 | /* End of cleaning variable m */ | |||
| 22142 | /* End of cleaning variable kb */ | |||
| 22143 | /* End of cleaning variable ldb */ | |||
| 22144 | /* End of cleaning variable ka */ | |||
| 22145 | /* End of cleaning variable lda */ | |||
| 22146 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 22147 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 22148 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 22149 | /* End of cleaning variable b */ | |||
| 22150 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 22151 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 22152 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 22153 | /* End of cleaning variable a */ | |||
| 22154 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 22155 | /* End of cleaning variable beta */ | |||
| 22156 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 22157 | /* End of cleaning variable alpha */ | |||
| 22158 | } /*CHECKSCALAR(trans_b>=0 && trans_b <=2)*/ | |||
| 22159 | } /*if (f2py_success) of trans_b*/ | |||
| 22160 | /* End of cleaning variable trans_b */ | |||
| 22161 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 22162 | } /*if (f2py_success) of trans_a*/ | |||
| 22163 | /* End of cleaning variable trans_a */ | |||
| 22164 | /*end of cleanupfrompyobj*/ | |||
| 22165 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 22166 | /*routdebugfailure*/ | |||
| 22167 | } else { | |||
| 22168 | /*routdebugleave*/ | |||
| 22169 | } | |||
| 22170 | CFUNCSMESS("Freeing memory.\n"); | |||
| 22171 | /*freemem*/ | |||
| 22172 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22173 | f2py_stop_clock(); | |||
| 22174 | #endif | |||
| 22175 | return capi_buildvalue; | |||
| 22176 | } | |||
| 22177 | /******************************** end of zgemm ********************************/ | |||
| 22178 | ||||
| 22179 | /*********************************** ssymm ***********************************/ | |||
| 22180 | static char doc_f2py_rout__fblas_ssymm[] = "\ | |||
| 22181 | c = ssymm(alpha,a,b,[beta,c,side,lower,overwrite_c])\n\nWrapper for ``ssymm``.\ | |||
| 22182 | \n\nParameters\n----------\n" | |||
| 22183 | "alpha : input float\n" | |||
| 22184 | "a : input rank-2 array('f') with bounds (lda,ka)\n" | |||
| 22185 | "b : input rank-2 array('f') with bounds (ldb,kb)\n" | |||
| 22186 | "\nOther Parameters\n----------------\n" | |||
| 22187 | "beta : input float, optional\n Default: 0.0\n" | |||
| 22188 | "c : input rank-2 array('f') with bounds (m,n)\n" | |||
| 22189 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 22190 | "side : input int, optional\n Default: 0\n" | |||
| 22191 | "lower : input int, optional\n Default: 0\n" | |||
| 22192 | "\nReturns\n-------\n" | |||
| 22193 | "c : rank-2 array('f') with bounds (m,n)"; | |||
| 22194 | /* extern void F_FUNC(ssymm,SSYMM)(char*,char*,F_INT*,F_INT*,float*,float*,F_INT*,float*, F_INT*,float*,float*,F_INT* ); */ | |||
| 22195 | static PyObject *f2py_rout__fblas_ssymm(const PyObject *capi_self, | |||
| 22196 | PyObject *capi_args, | |||
| 22197 | PyObject *capi_keywds, | |||
| 22198 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*, F_INTint*,float*,float*,F_INTint* )) { | |||
| 22199 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 22200 | volatile int f2py_success = 1; | |||
| 22201 | /*decl*/ | |||
| 22202 | ||||
| 22203 | int m = 0; | |||
| 22204 | int n = 0; | |||
| 22205 | float alpha = 0; | |||
| 22206 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 22207 | float *a = NULL((void*)0); | |||
| 22208 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 22209 | const int a_Rank = 2; | |||
| 22210 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 22211 | int capi_a_intent = 0; | |||
| 22212 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 22213 | float *b = NULL((void*)0); | |||
| 22214 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 22215 | const int b_Rank = 2; | |||
| 22216 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 22217 | int capi_b_intent = 0; | |||
| 22218 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 22219 | float beta = 0; | |||
| 22220 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 22221 | float *c = NULL((void*)0); | |||
| 22222 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 22223 | const int c_Rank = 2; | |||
| 22224 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 22225 | int capi_c_intent = 0; | |||
| 22226 | int capi_overwrite_c = 0; | |||
| 22227 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 22228 | int side = 0; | |||
| 22229 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 22230 | int lower = 0; | |||
| 22231 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 22232 | int lda = 0; | |||
| 22233 | int ka = 0; | |||
| 22234 | int ldb = 0; | |||
| 22235 | int kb = 0; | |||
| 22236 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","side","lower","overwrite_c",NULL((void*)0)}; | |||
| 22237 | ||||
| 22238 | /*routdebugenter*/ | |||
| 22239 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22240 | f2py_start_clock(); | |||
| 22241 | #endif | |||
| 22242 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 22243 | "OOO|OOOOi:_fblas.ssymm",\ | |||
| 22244 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&side_capi,&lower_capi,&capi_overwrite_c)) | |||
| 22245 | return NULL((void*)0); | |||
| 22246 | /*frompyobj*/ | |||
| 22247 | /* Processing variable side */ | |||
| 22248 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 22249 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.ssymm() 3rd keyword (side) can't be converted to int"); | |||
| 22250 | if (f2py_success) { | |||
| 22251 | CHECKSCALAR(side==0||side==1,"side==0||side==1","3rd keyword side","ssymm:side=%d",side)if (!(side==0||side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssymm:side=%d", "(""side==0||side==1"") failed for " "3rd keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22252 | /* Processing variable lower */ | |||
| 22253 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 22254 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssymm() 4th keyword (lower) can't be converted to int"); | |||
| 22255 | if (f2py_success) { | |||
| 22256 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","ssymm:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssymm:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22257 | /* Processing variable alpha */ | |||
| 22258 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssymm() 1st argument (alpha) can't be converted to float"); | |||
| 22259 | if (f2py_success) { | |||
| 22260 | /* Processing variable beta */ | |||
| 22261 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 22262 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.ssymm() 1st keyword (beta) can't be converted to float"); | |||
| 22263 | if (f2py_success) { | |||
| 22264 | /* Processing variable a */ | |||
| 22265 | ; | |||
| 22266 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 22267 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 22268 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 22269 | if (!PyErr_Occurred()) | |||
| 22270 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ssymm to C/Fortran array" ); | |||
| 22271 | } else { | |||
| 22272 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 22273 | ||||
| 22274 | /* Processing variable b */ | |||
| 22275 | ; | |||
| 22276 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 22277 | capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 22278 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 22279 | if (!PyErr_Occurred()) | |||
| 22280 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.ssymm to C/Fortran array" ); | |||
| 22281 | } else { | |||
| 22282 | b = (float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 22283 | ||||
| 22284 | /* Processing variable lda */ | |||
| 22285 | lda = shape(a,0)a_Dims[0]; | |||
| 22286 | /* Processing variable ka */ | |||
| 22287 | ka = shape(a,1)a_Dims[1]; | |||
| 22288 | /* Processing variable ldb */ | |||
| 22289 | ldb = shape(b,0)b_Dims[0]; | |||
| 22290 | /* Processing variable kb */ | |||
| 22291 | kb = shape(b, 1)b_Dims[1]; | |||
| 22292 | /* Processing variable m */ | |||
| 22293 | m = (side ? ldb : lda); | |||
| 22294 | /* Processing variable n */ | |||
| 22295 | n = (side ? ka : kb); | |||
| 22296 | CHECKSCALAR(side? kb==lda : ka==ldb,"side? kb==lda : ka==ldb","hidden n","ssymm:n=%d",n)if (!(side? kb==lda : ka==ldb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssymm:n=%d", "(""side? kb==lda : ka==ldb"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 22297 | /* Processing variable c */ | |||
| 22298 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 22299 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 22300 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 22301 | capi_c_tmp = array_from_pyobj(NPY_FLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 22302 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 22303 | if (!PyErr_Occurred()) | |||
| 22304 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.ssymm to C/Fortran array" ); | |||
| 22305 | } else { | |||
| 22306 | c = (float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 22307 | ||||
| 22308 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 22309 | /*end of frompyobj*/ | |||
| 22310 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22311 | f2py_start_call_clock(); | |||
| 22312 | #endif | |||
| 22313 | /*callfortranroutine*/ | |||
| 22314 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),&m,&n,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 22315 | /*(*f2py_func)(&m,&n,&alpha,a,b,&beta,c,&side,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 22316 | if (PyErr_Occurred()) | |||
| 22317 | f2py_success = 0; | |||
| 22318 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22319 | f2py_stop_call_clock(); | |||
| 22320 | #endif | |||
| 22321 | /*end of callfortranroutine*/ | |||
| 22322 | if (f2py_success) { | |||
| 22323 | /*pyobjfrom*/ | |||
| 22324 | /*end of pyobjfrom*/ | |||
| 22325 | CFUNCSMESS("Building return value.\n"); | |||
| 22326 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 22327 | /*closepyobjfrom*/ | |||
| 22328 | /*end of closepyobjfrom*/ | |||
| 22329 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 22330 | /*cleanupfrompyobj*/ | |||
| 22331 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 22332 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 22333 | /* End of cleaning variable c */ | |||
| 22334 | } /*CHECKSCALAR(side? kb==lda : ka==ldb)*/ | |||
| 22335 | /* End of cleaning variable n */ | |||
| 22336 | /* End of cleaning variable m */ | |||
| 22337 | /* End of cleaning variable kb */ | |||
| 22338 | /* End of cleaning variable ldb */ | |||
| 22339 | /* End of cleaning variable ka */ | |||
| 22340 | /* End of cleaning variable lda */ | |||
| 22341 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 22342 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 22343 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 22344 | /* End of cleaning variable b */ | |||
| 22345 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 22346 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 22347 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 22348 | /* End of cleaning variable a */ | |||
| 22349 | } /*if (f2py_success) of beta*/ | |||
| 22350 | /* End of cleaning variable beta */ | |||
| 22351 | } /*if (f2py_success) of alpha*/ | |||
| 22352 | /* End of cleaning variable alpha */ | |||
| 22353 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 22354 | } /*if (f2py_success) of lower*/ | |||
| 22355 | /* End of cleaning variable lower */ | |||
| 22356 | } /*CHECKSCALAR(side==0||side==1)*/ | |||
| 22357 | } /*if (f2py_success) of side*/ | |||
| 22358 | /* End of cleaning variable side */ | |||
| 22359 | /*end of cleanupfrompyobj*/ | |||
| 22360 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 22361 | /*routdebugfailure*/ | |||
| 22362 | } else { | |||
| 22363 | /*routdebugleave*/ | |||
| 22364 | } | |||
| 22365 | CFUNCSMESS("Freeing memory.\n"); | |||
| 22366 | /*freemem*/ | |||
| 22367 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22368 | f2py_stop_clock(); | |||
| 22369 | #endif | |||
| 22370 | return capi_buildvalue; | |||
| 22371 | } | |||
| 22372 | /******************************** end of ssymm ********************************/ | |||
| 22373 | ||||
| 22374 | /*********************************** dsymm ***********************************/ | |||
| 22375 | static char doc_f2py_rout__fblas_dsymm[] = "\ | |||
| 22376 | c = dsymm(alpha,a,b,[beta,c,side,lower,overwrite_c])\n\nWrapper for ``dsymm``.\ | |||
| 22377 | \n\nParameters\n----------\n" | |||
| 22378 | "alpha : input float\n" | |||
| 22379 | "a : input rank-2 array('d') with bounds (lda,ka)\n" | |||
| 22380 | "b : input rank-2 array('d') with bounds (ldb,kb)\n" | |||
| 22381 | "\nOther Parameters\n----------------\n" | |||
| 22382 | "beta : input float, optional\n Default: 0.0\n" | |||
| 22383 | "c : input rank-2 array('d') with bounds (m,n)\n" | |||
| 22384 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 22385 | "side : input int, optional\n Default: 0\n" | |||
| 22386 | "lower : input int, optional\n Default: 0\n" | |||
| 22387 | "\nReturns\n-------\n" | |||
| 22388 | "c : rank-2 array('d') with bounds (m,n)"; | |||
| 22389 | /* extern void F_FUNC(dsymm,DSYMM)(char*,char*,F_INT*,F_INT*,double*,double*,F_INT*,double*, F_INT*,double*,double*,F_INT* ); */ | |||
| 22390 | static PyObject *f2py_rout__fblas_dsymm(const PyObject *capi_self, | |||
| 22391 | PyObject *capi_args, | |||
| 22392 | PyObject *capi_keywds, | |||
| 22393 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*, F_INTint*,double*,double*,F_INTint* )) { | |||
| 22394 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 22395 | volatile int f2py_success = 1; | |||
| 22396 | /*decl*/ | |||
| 22397 | ||||
| 22398 | int m = 0; | |||
| 22399 | int n = 0; | |||
| 22400 | double alpha = 0; | |||
| 22401 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 22402 | double *a = NULL((void*)0); | |||
| 22403 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 22404 | const int a_Rank = 2; | |||
| 22405 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 22406 | int capi_a_intent = 0; | |||
| 22407 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 22408 | double *b = NULL((void*)0); | |||
| 22409 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 22410 | const int b_Rank = 2; | |||
| 22411 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 22412 | int capi_b_intent = 0; | |||
| 22413 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 22414 | double beta = 0; | |||
| 22415 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 22416 | double *c = NULL((void*)0); | |||
| 22417 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 22418 | const int c_Rank = 2; | |||
| 22419 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 22420 | int capi_c_intent = 0; | |||
| 22421 | int capi_overwrite_c = 0; | |||
| 22422 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 22423 | int side = 0; | |||
| 22424 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 22425 | int lower = 0; | |||
| 22426 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 22427 | int lda = 0; | |||
| 22428 | int ka = 0; | |||
| 22429 | int ldb = 0; | |||
| 22430 | int kb = 0; | |||
| 22431 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","side","lower","overwrite_c",NULL((void*)0)}; | |||
| 22432 | ||||
| 22433 | /*routdebugenter*/ | |||
| 22434 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22435 | f2py_start_clock(); | |||
| 22436 | #endif | |||
| 22437 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 22438 | "OOO|OOOOi:_fblas.dsymm",\ | |||
| 22439 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&side_capi,&lower_capi,&capi_overwrite_c)) | |||
| 22440 | return NULL((void*)0); | |||
| 22441 | /*frompyobj*/ | |||
| 22442 | /* Processing variable side */ | |||
| 22443 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 22444 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.dsymm() 3rd keyword (side) can't be converted to int"); | |||
| 22445 | if (f2py_success) { | |||
| 22446 | CHECKSCALAR(side==0||side==1,"side==0||side==1","3rd keyword side","dsymm:side=%d",side)if (!(side==0||side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsymm:side=%d", "(""side==0||side==1"") failed for " "3rd keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22447 | /* Processing variable lower */ | |||
| 22448 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 22449 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsymm() 4th keyword (lower) can't be converted to int"); | |||
| 22450 | if (f2py_success) { | |||
| 22451 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","dsymm:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsymm:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22452 | /* Processing variable alpha */ | |||
| 22453 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsymm() 1st argument (alpha) can't be converted to double"); | |||
| 22454 | if (f2py_success) { | |||
| 22455 | /* Processing variable beta */ | |||
| 22456 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 22457 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dsymm() 1st keyword (beta) can't be converted to double"); | |||
| 22458 | if (f2py_success) { | |||
| 22459 | /* Processing variable a */ | |||
| 22460 | ; | |||
| 22461 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 22462 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 22463 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 22464 | if (!PyErr_Occurred()) | |||
| 22465 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dsymm to C/Fortran array" ); | |||
| 22466 | } else { | |||
| 22467 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 22468 | ||||
| 22469 | /* Processing variable b */ | |||
| 22470 | ; | |||
| 22471 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 22472 | capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 22473 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 22474 | if (!PyErr_Occurred()) | |||
| 22475 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.dsymm to C/Fortran array" ); | |||
| 22476 | } else { | |||
| 22477 | b = (double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 22478 | ||||
| 22479 | /* Processing variable lda */ | |||
| 22480 | lda = shape(a,0)a_Dims[0]; | |||
| 22481 | /* Processing variable ka */ | |||
| 22482 | ka = shape(a,1)a_Dims[1]; | |||
| 22483 | /* Processing variable ldb */ | |||
| 22484 | ldb = shape(b,0)b_Dims[0]; | |||
| 22485 | /* Processing variable kb */ | |||
| 22486 | kb = shape(b, 1)b_Dims[1]; | |||
| 22487 | /* Processing variable m */ | |||
| 22488 | m = (side ? ldb : lda); | |||
| 22489 | /* Processing variable n */ | |||
| 22490 | n = (side ? ka : kb); | |||
| 22491 | CHECKSCALAR(side? kb==lda : ka==ldb,"side? kb==lda : ka==ldb","hidden n","dsymm:n=%d",n)if (!(side? kb==lda : ka==ldb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsymm:n=%d", "(""side? kb==lda : ka==ldb"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 22492 | /* Processing variable c */ | |||
| 22493 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 22494 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 22495 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 22496 | capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 22497 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 22498 | if (!PyErr_Occurred()) | |||
| 22499 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.dsymm to C/Fortran array" ); | |||
| 22500 | } else { | |||
| 22501 | c = (double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 22502 | ||||
| 22503 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 22504 | /*end of frompyobj*/ | |||
| 22505 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22506 | f2py_start_call_clock(); | |||
| 22507 | #endif | |||
| 22508 | /*callfortranroutine*/ | |||
| 22509 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),&m,&n,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 22510 | /*(*f2py_func)(&m,&n,&alpha,a,b,&beta,c,&side,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 22511 | if (PyErr_Occurred()) | |||
| 22512 | f2py_success = 0; | |||
| 22513 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22514 | f2py_stop_call_clock(); | |||
| 22515 | #endif | |||
| 22516 | /*end of callfortranroutine*/ | |||
| 22517 | if (f2py_success) { | |||
| 22518 | /*pyobjfrom*/ | |||
| 22519 | /*end of pyobjfrom*/ | |||
| 22520 | CFUNCSMESS("Building return value.\n"); | |||
| 22521 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 22522 | /*closepyobjfrom*/ | |||
| 22523 | /*end of closepyobjfrom*/ | |||
| 22524 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 22525 | /*cleanupfrompyobj*/ | |||
| 22526 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 22527 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 22528 | /* End of cleaning variable c */ | |||
| 22529 | } /*CHECKSCALAR(side? kb==lda : ka==ldb)*/ | |||
| 22530 | /* End of cleaning variable n */ | |||
| 22531 | /* End of cleaning variable m */ | |||
| 22532 | /* End of cleaning variable kb */ | |||
| 22533 | /* End of cleaning variable ldb */ | |||
| 22534 | /* End of cleaning variable ka */ | |||
| 22535 | /* End of cleaning variable lda */ | |||
| 22536 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 22537 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 22538 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 22539 | /* End of cleaning variable b */ | |||
| 22540 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 22541 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 22542 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 22543 | /* End of cleaning variable a */ | |||
| 22544 | } /*if (f2py_success) of beta*/ | |||
| 22545 | /* End of cleaning variable beta */ | |||
| 22546 | } /*if (f2py_success) of alpha*/ | |||
| 22547 | /* End of cleaning variable alpha */ | |||
| 22548 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 22549 | } /*if (f2py_success) of lower*/ | |||
| 22550 | /* End of cleaning variable lower */ | |||
| 22551 | } /*CHECKSCALAR(side==0||side==1)*/ | |||
| 22552 | } /*if (f2py_success) of side*/ | |||
| 22553 | /* End of cleaning variable side */ | |||
| 22554 | /*end of cleanupfrompyobj*/ | |||
| 22555 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 22556 | /*routdebugfailure*/ | |||
| 22557 | } else { | |||
| 22558 | /*routdebugleave*/ | |||
| 22559 | } | |||
| 22560 | CFUNCSMESS("Freeing memory.\n"); | |||
| 22561 | /*freemem*/ | |||
| 22562 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22563 | f2py_stop_clock(); | |||
| 22564 | #endif | |||
| 22565 | return capi_buildvalue; | |||
| 22566 | } | |||
| 22567 | /******************************** end of dsymm ********************************/ | |||
| 22568 | ||||
| 22569 | /*********************************** csymm ***********************************/ | |||
| 22570 | static char doc_f2py_rout__fblas_csymm[] = "\ | |||
| 22571 | c = csymm(alpha,a,b,[beta,c,side,lower,overwrite_c])\n\nWrapper for ``csymm``.\ | |||
| 22572 | \n\nParameters\n----------\n" | |||
| 22573 | "alpha : input complex\n" | |||
| 22574 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 22575 | "b : input rank-2 array('F') with bounds (ldb,kb)\n" | |||
| 22576 | "\nOther Parameters\n----------------\n" | |||
| 22577 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 22578 | "c : input rank-2 array('F') with bounds (m,n)\n" | |||
| 22579 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 22580 | "side : input int, optional\n Default: 0\n" | |||
| 22581 | "lower : input int, optional\n Default: 0\n" | |||
| 22582 | "\nReturns\n-------\n" | |||
| 22583 | "c : rank-2 array('F') with bounds (m,n)"; | |||
| 22584 | /* extern void F_FUNC(csymm,CSYMM)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*, F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 22585 | static PyObject *f2py_rout__fblas_csymm(const PyObject *capi_self, | |||
| 22586 | PyObject *capi_args, | |||
| 22587 | PyObject *capi_keywds, | |||
| 22588 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 22589 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 22590 | volatile int f2py_success = 1; | |||
| 22591 | /*decl*/ | |||
| 22592 | ||||
| 22593 | int m = 0; | |||
| 22594 | int n = 0; | |||
| 22595 | complex_float alpha; | |||
| 22596 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 22597 | complex_float *a = NULL((void*)0); | |||
| 22598 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 22599 | const int a_Rank = 2; | |||
| 22600 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 22601 | int capi_a_intent = 0; | |||
| 22602 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 22603 | complex_float *b = NULL((void*)0); | |||
| 22604 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 22605 | const int b_Rank = 2; | |||
| 22606 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 22607 | int capi_b_intent = 0; | |||
| 22608 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 22609 | complex_float beta; | |||
| 22610 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 22611 | complex_float *c = NULL((void*)0); | |||
| 22612 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 22613 | const int c_Rank = 2; | |||
| 22614 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 22615 | int capi_c_intent = 0; | |||
| 22616 | int capi_overwrite_c = 0; | |||
| 22617 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 22618 | int side = 0; | |||
| 22619 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 22620 | int lower = 0; | |||
| 22621 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 22622 | int lda = 0; | |||
| 22623 | int ka = 0; | |||
| 22624 | int ldb = 0; | |||
| 22625 | int kb = 0; | |||
| 22626 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","side","lower","overwrite_c",NULL((void*)0)}; | |||
| 22627 | ||||
| 22628 | /*routdebugenter*/ | |||
| 22629 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22630 | f2py_start_clock(); | |||
| 22631 | #endif | |||
| 22632 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 22633 | "OOO|OOOOi:_fblas.csymm",\ | |||
| 22634 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&side_capi,&lower_capi,&capi_overwrite_c)) | |||
| 22635 | return NULL((void*)0); | |||
| 22636 | /*frompyobj*/ | |||
| 22637 | /* Processing variable side */ | |||
| 22638 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 22639 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.csymm() 3rd keyword (side) can't be converted to int"); | |||
| 22640 | if (f2py_success) { | |||
| 22641 | CHECKSCALAR(side==0||side==1,"side==0||side==1","3rd keyword side","csymm:side=%d",side)if (!(side==0||side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csymm:side=%d", "(""side==0||side==1"") failed for " "3rd keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22642 | /* Processing variable lower */ | |||
| 22643 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 22644 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.csymm() 4th keyword (lower) can't be converted to int"); | |||
| 22645 | if (f2py_success) { | |||
| 22646 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","csymm:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csymm:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22647 | /* Processing variable alpha */ | |||
| 22648 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.csymm() 1st argument (alpha) can't be converted to complex_float"); | |||
| 22649 | if (f2py_success) { | |||
| 22650 | /* Processing variable beta */ | |||
| 22651 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 22652 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.csymm() 1st keyword (beta) can't be converted to complex_float"); | |||
| 22653 | if (f2py_success) { | |||
| 22654 | /* Processing variable a */ | |||
| 22655 | ; | |||
| 22656 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 22657 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 22658 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 22659 | if (!PyErr_Occurred()) | |||
| 22660 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.csymm to C/Fortran array" ); | |||
| 22661 | } else { | |||
| 22662 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 22663 | ||||
| 22664 | /* Processing variable b */ | |||
| 22665 | ; | |||
| 22666 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 22667 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 22668 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 22669 | if (!PyErr_Occurred()) | |||
| 22670 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.csymm to C/Fortran array" ); | |||
| 22671 | } else { | |||
| 22672 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 22673 | ||||
| 22674 | /* Processing variable lda */ | |||
| 22675 | lda = shape(a,0)a_Dims[0]; | |||
| 22676 | /* Processing variable ka */ | |||
| 22677 | ka = shape(a,1)a_Dims[1]; | |||
| 22678 | /* Processing variable ldb */ | |||
| 22679 | ldb = shape(b,0)b_Dims[0]; | |||
| 22680 | /* Processing variable kb */ | |||
| 22681 | kb = shape(b, 1)b_Dims[1]; | |||
| 22682 | /* Processing variable m */ | |||
| 22683 | m = (side ? ldb : lda); | |||
| 22684 | /* Processing variable n */ | |||
| 22685 | n = (side ? ka : kb); | |||
| 22686 | CHECKSCALAR(side? kb==lda : ka==ldb,"side? kb==lda : ka==ldb","hidden n","csymm:n=%d",n)if (!(side? kb==lda : ka==ldb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csymm:n=%d", "(""side? kb==lda : ka==ldb"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 22687 | /* Processing variable c */ | |||
| 22688 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 22689 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 22690 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 22691 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 22692 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 22693 | if (!PyErr_Occurred()) | |||
| 22694 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.csymm to C/Fortran array" ); | |||
| 22695 | } else { | |||
| 22696 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 22697 | ||||
| 22698 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 22699 | /*end of frompyobj*/ | |||
| 22700 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22701 | f2py_start_call_clock(); | |||
| 22702 | #endif | |||
| 22703 | /*callfortranroutine*/ | |||
| 22704 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),&m,&n,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 22705 | /*(*f2py_func)(&m,&n,&alpha,a,b,&beta,c,&side,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 22706 | if (PyErr_Occurred()) | |||
| 22707 | f2py_success = 0; | |||
| 22708 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22709 | f2py_stop_call_clock(); | |||
| 22710 | #endif | |||
| 22711 | /*end of callfortranroutine*/ | |||
| 22712 | if (f2py_success) { | |||
| 22713 | /*pyobjfrom*/ | |||
| 22714 | /*end of pyobjfrom*/ | |||
| 22715 | CFUNCSMESS("Building return value.\n"); | |||
| 22716 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 22717 | /*closepyobjfrom*/ | |||
| 22718 | /*end of closepyobjfrom*/ | |||
| 22719 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 22720 | /*cleanupfrompyobj*/ | |||
| 22721 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 22722 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 22723 | /* End of cleaning variable c */ | |||
| 22724 | } /*CHECKSCALAR(side? kb==lda : ka==ldb)*/ | |||
| 22725 | /* End of cleaning variable n */ | |||
| 22726 | /* End of cleaning variable m */ | |||
| 22727 | /* End of cleaning variable kb */ | |||
| 22728 | /* End of cleaning variable ldb */ | |||
| 22729 | /* End of cleaning variable ka */ | |||
| 22730 | /* End of cleaning variable lda */ | |||
| 22731 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 22732 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 22733 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 22734 | /* End of cleaning variable b */ | |||
| 22735 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 22736 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 22737 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 22738 | /* End of cleaning variable a */ | |||
| 22739 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 22740 | /* End of cleaning variable beta */ | |||
| 22741 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 22742 | /* End of cleaning variable alpha */ | |||
| 22743 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 22744 | } /*if (f2py_success) of lower*/ | |||
| 22745 | /* End of cleaning variable lower */ | |||
| 22746 | } /*CHECKSCALAR(side==0||side==1)*/ | |||
| 22747 | } /*if (f2py_success) of side*/ | |||
| 22748 | /* End of cleaning variable side */ | |||
| 22749 | /*end of cleanupfrompyobj*/ | |||
| 22750 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 22751 | /*routdebugfailure*/ | |||
| 22752 | } else { | |||
| 22753 | /*routdebugleave*/ | |||
| 22754 | } | |||
| 22755 | CFUNCSMESS("Freeing memory.\n"); | |||
| 22756 | /*freemem*/ | |||
| 22757 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22758 | f2py_stop_clock(); | |||
| 22759 | #endif | |||
| 22760 | return capi_buildvalue; | |||
| 22761 | } | |||
| 22762 | /******************************** end of csymm ********************************/ | |||
| 22763 | ||||
| 22764 | /*********************************** zsymm ***********************************/ | |||
| 22765 | static char doc_f2py_rout__fblas_zsymm[] = "\ | |||
| 22766 | c = zsymm(alpha,a,b,[beta,c,side,lower,overwrite_c])\n\nWrapper for ``zsymm``.\ | |||
| 22767 | \n\nParameters\n----------\n" | |||
| 22768 | "alpha : input complex\n" | |||
| 22769 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 22770 | "b : input rank-2 array('D') with bounds (ldb,kb)\n" | |||
| 22771 | "\nOther Parameters\n----------------\n" | |||
| 22772 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 22773 | "c : input rank-2 array('D') with bounds (m,n)\n" | |||
| 22774 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 22775 | "side : input int, optional\n Default: 0\n" | |||
| 22776 | "lower : input int, optional\n Default: 0\n" | |||
| 22777 | "\nReturns\n-------\n" | |||
| 22778 | "c : rank-2 array('D') with bounds (m,n)"; | |||
| 22779 | /* extern void F_FUNC(zsymm,ZSYMM)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*, F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 22780 | static PyObject *f2py_rout__fblas_zsymm(const PyObject *capi_self, | |||
| 22781 | PyObject *capi_args, | |||
| 22782 | PyObject *capi_keywds, | |||
| 22783 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 22784 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 22785 | volatile int f2py_success = 1; | |||
| 22786 | /*decl*/ | |||
| 22787 | ||||
| 22788 | int m = 0; | |||
| 22789 | int n = 0; | |||
| 22790 | complex_double alpha; | |||
| 22791 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 22792 | complex_double *a = NULL((void*)0); | |||
| 22793 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 22794 | const int a_Rank = 2; | |||
| 22795 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 22796 | int capi_a_intent = 0; | |||
| 22797 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 22798 | complex_double *b = NULL((void*)0); | |||
| 22799 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 22800 | const int b_Rank = 2; | |||
| 22801 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 22802 | int capi_b_intent = 0; | |||
| 22803 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 22804 | complex_double beta; | |||
| 22805 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 22806 | complex_double *c = NULL((void*)0); | |||
| 22807 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 22808 | const int c_Rank = 2; | |||
| 22809 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 22810 | int capi_c_intent = 0; | |||
| 22811 | int capi_overwrite_c = 0; | |||
| 22812 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 22813 | int side = 0; | |||
| 22814 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 22815 | int lower = 0; | |||
| 22816 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 22817 | int lda = 0; | |||
| 22818 | int ka = 0; | |||
| 22819 | int ldb = 0; | |||
| 22820 | int kb = 0; | |||
| 22821 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","side","lower","overwrite_c",NULL((void*)0)}; | |||
| 22822 | ||||
| 22823 | /*routdebugenter*/ | |||
| 22824 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22825 | f2py_start_clock(); | |||
| 22826 | #endif | |||
| 22827 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 22828 | "OOO|OOOOi:_fblas.zsymm",\ | |||
| 22829 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&side_capi,&lower_capi,&capi_overwrite_c)) | |||
| 22830 | return NULL((void*)0); | |||
| 22831 | /*frompyobj*/ | |||
| 22832 | /* Processing variable side */ | |||
| 22833 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 22834 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.zsymm() 3rd keyword (side) can't be converted to int"); | |||
| 22835 | if (f2py_success) { | |||
| 22836 | CHECKSCALAR(side==0||side==1,"side==0||side==1","3rd keyword side","zsymm:side=%d",side)if (!(side==0||side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsymm:side=%d", "(""side==0||side==1"") failed for " "3rd keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22837 | /* Processing variable lower */ | |||
| 22838 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 22839 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zsymm() 4th keyword (lower) can't be converted to int"); | |||
| 22840 | if (f2py_success) { | |||
| 22841 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","zsymm:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsymm:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 22842 | /* Processing variable alpha */ | |||
| 22843 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zsymm() 1st argument (alpha) can't be converted to complex_double"); | |||
| 22844 | if (f2py_success) { | |||
| 22845 | /* Processing variable beta */ | |||
| 22846 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 22847 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zsymm() 1st keyword (beta) can't be converted to complex_double"); | |||
| 22848 | if (f2py_success) { | |||
| 22849 | /* Processing variable a */ | |||
| 22850 | ; | |||
| 22851 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 22852 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 22853 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 22854 | if (!PyErr_Occurred()) | |||
| 22855 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zsymm to C/Fortran array" ); | |||
| 22856 | } else { | |||
| 22857 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 22858 | ||||
| 22859 | /* Processing variable b */ | |||
| 22860 | ; | |||
| 22861 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 22862 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 22863 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 22864 | if (!PyErr_Occurred()) | |||
| 22865 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.zsymm to C/Fortran array" ); | |||
| 22866 | } else { | |||
| 22867 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 22868 | ||||
| 22869 | /* Processing variable lda */ | |||
| 22870 | lda = shape(a,0)a_Dims[0]; | |||
| 22871 | /* Processing variable ka */ | |||
| 22872 | ka = shape(a,1)a_Dims[1]; | |||
| 22873 | /* Processing variable ldb */ | |||
| 22874 | ldb = shape(b,0)b_Dims[0]; | |||
| 22875 | /* Processing variable kb */ | |||
| 22876 | kb = shape(b, 1)b_Dims[1]; | |||
| 22877 | /* Processing variable m */ | |||
| 22878 | m = (side ? ldb : lda); | |||
| 22879 | /* Processing variable n */ | |||
| 22880 | n = (side ? ka : kb); | |||
| 22881 | CHECKSCALAR(side? kb==lda : ka==ldb,"side? kb==lda : ka==ldb","hidden n","zsymm:n=%d",n)if (!(side? kb==lda : ka==ldb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsymm:n=%d", "(""side? kb==lda : ka==ldb"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 22882 | /* Processing variable c */ | |||
| 22883 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 22884 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 22885 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 22886 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 22887 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 22888 | if (!PyErr_Occurred()) | |||
| 22889 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zsymm to C/Fortran array" ); | |||
| 22890 | } else { | |||
| 22891 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 22892 | ||||
| 22893 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 22894 | /*end of frompyobj*/ | |||
| 22895 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22896 | f2py_start_call_clock(); | |||
| 22897 | #endif | |||
| 22898 | /*callfortranroutine*/ | |||
| 22899 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),&m,&n,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 22900 | /*(*f2py_func)(&m,&n,&alpha,a,b,&beta,c,&side,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 22901 | if (PyErr_Occurred()) | |||
| 22902 | f2py_success = 0; | |||
| 22903 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22904 | f2py_stop_call_clock(); | |||
| 22905 | #endif | |||
| 22906 | /*end of callfortranroutine*/ | |||
| 22907 | if (f2py_success) { | |||
| 22908 | /*pyobjfrom*/ | |||
| 22909 | /*end of pyobjfrom*/ | |||
| 22910 | CFUNCSMESS("Building return value.\n"); | |||
| 22911 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 22912 | /*closepyobjfrom*/ | |||
| 22913 | /*end of closepyobjfrom*/ | |||
| 22914 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 22915 | /*cleanupfrompyobj*/ | |||
| 22916 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 22917 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 22918 | /* End of cleaning variable c */ | |||
| 22919 | } /*CHECKSCALAR(side? kb==lda : ka==ldb)*/ | |||
| 22920 | /* End of cleaning variable n */ | |||
| 22921 | /* End of cleaning variable m */ | |||
| 22922 | /* End of cleaning variable kb */ | |||
| 22923 | /* End of cleaning variable ldb */ | |||
| 22924 | /* End of cleaning variable ka */ | |||
| 22925 | /* End of cleaning variable lda */ | |||
| 22926 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 22927 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 22928 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 22929 | /* End of cleaning variable b */ | |||
| 22930 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 22931 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 22932 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 22933 | /* End of cleaning variable a */ | |||
| 22934 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 22935 | /* End of cleaning variable beta */ | |||
| 22936 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 22937 | /* End of cleaning variable alpha */ | |||
| 22938 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 22939 | } /*if (f2py_success) of lower*/ | |||
| 22940 | /* End of cleaning variable lower */ | |||
| 22941 | } /*CHECKSCALAR(side==0||side==1)*/ | |||
| 22942 | } /*if (f2py_success) of side*/ | |||
| 22943 | /* End of cleaning variable side */ | |||
| 22944 | /*end of cleanupfrompyobj*/ | |||
| 22945 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 22946 | /*routdebugfailure*/ | |||
| 22947 | } else { | |||
| 22948 | /*routdebugleave*/ | |||
| 22949 | } | |||
| 22950 | CFUNCSMESS("Freeing memory.\n"); | |||
| 22951 | /*freemem*/ | |||
| 22952 | #ifdef F2PY_REPORT_ATEXIT | |||
| 22953 | f2py_stop_clock(); | |||
| 22954 | #endif | |||
| 22955 | return capi_buildvalue; | |||
| 22956 | } | |||
| 22957 | /******************************** end of zsymm ********************************/ | |||
| 22958 | ||||
| 22959 | /*********************************** chemm ***********************************/ | |||
| 22960 | static char doc_f2py_rout__fblas_chemm[] = "\ | |||
| 22961 | c = chemm(alpha,a,b,[beta,c,side,lower,overwrite_c])\n\nWrapper for ``chemm``.\ | |||
| 22962 | \n\nParameters\n----------\n" | |||
| 22963 | "alpha : input complex\n" | |||
| 22964 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 22965 | "b : input rank-2 array('F') with bounds (ldb,kb)\n" | |||
| 22966 | "\nOther Parameters\n----------------\n" | |||
| 22967 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 22968 | "c : input rank-2 array('F') with bounds (m,n)\n" | |||
| 22969 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 22970 | "side : input int, optional\n Default: 0\n" | |||
| 22971 | "lower : input int, optional\n Default: 0\n" | |||
| 22972 | "\nReturns\n-------\n" | |||
| 22973 | "c : rank-2 array('F') with bounds (m,n)"; | |||
| 22974 | /* extern void F_FUNC(chemm,CHEMM)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*, F_INT*,complex_float*,complex_float*,F_INT* ); */ | |||
| 22975 | static PyObject *f2py_rout__fblas_chemm(const PyObject *capi_self, | |||
| 22976 | PyObject *capi_args, | |||
| 22977 | PyObject *capi_keywds, | |||
| 22978 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint*,complex_float*,complex_float*,F_INTint* )) { | |||
| 22979 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 22980 | volatile int f2py_success = 1; | |||
| 22981 | /*decl*/ | |||
| 22982 | ||||
| 22983 | int m = 0; | |||
| 22984 | int n = 0; | |||
| 22985 | complex_float alpha; | |||
| 22986 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 22987 | complex_float *a = NULL((void*)0); | |||
| 22988 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 22989 | const int a_Rank = 2; | |||
| 22990 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 22991 | int capi_a_intent = 0; | |||
| 22992 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 22993 | complex_float *b = NULL((void*)0); | |||
| 22994 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 22995 | const int b_Rank = 2; | |||
| 22996 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 22997 | int capi_b_intent = 0; | |||
| 22998 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 22999 | complex_float beta; | |||
| 23000 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 23001 | complex_float *c = NULL((void*)0); | |||
| 23002 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 23003 | const int c_Rank = 2; | |||
| 23004 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 23005 | int capi_c_intent = 0; | |||
| 23006 | int capi_overwrite_c = 0; | |||
| 23007 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 23008 | int side = 0; | |||
| 23009 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 23010 | int lower = 0; | |||
| 23011 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 23012 | int lda = 0; | |||
| 23013 | int ka = 0; | |||
| 23014 | int ldb = 0; | |||
| 23015 | int kb = 0; | |||
| 23016 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","side","lower","overwrite_c",NULL((void*)0)}; | |||
| 23017 | ||||
| 23018 | /*routdebugenter*/ | |||
| 23019 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23020 | f2py_start_clock(); | |||
| 23021 | #endif | |||
| 23022 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 23023 | "OOO|OOOOi:_fblas.chemm",\ | |||
| 23024 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&side_capi,&lower_capi,&capi_overwrite_c)) | |||
| 23025 | return NULL((void*)0); | |||
| 23026 | /*frompyobj*/ | |||
| 23027 | /* Processing variable side */ | |||
| 23028 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 23029 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.chemm() 3rd keyword (side) can't be converted to int"); | |||
| 23030 | if (f2py_success) { | |||
| 23031 | CHECKSCALAR(side==0||side==1,"side==0||side==1","3rd keyword side","chemm:side=%d",side)if (!(side==0||side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chemm:side=%d", "(""side==0||side==1"") failed for " "3rd keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23032 | /* Processing variable lower */ | |||
| 23033 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 23034 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.chemm() 4th keyword (lower) can't be converted to int"); | |||
| 23035 | if (f2py_success) { | |||
| 23036 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","chemm:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chemm:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23037 | /* Processing variable alpha */ | |||
| 23038 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.chemm() 1st argument (alpha) can't be converted to complex_float"); | |||
| 23039 | if (f2py_success) { | |||
| 23040 | /* Processing variable beta */ | |||
| 23041 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 23042 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.chemm() 1st keyword (beta) can't be converted to complex_float"); | |||
| 23043 | if (f2py_success) { | |||
| 23044 | /* Processing variable a */ | |||
| 23045 | ; | |||
| 23046 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 23047 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 23048 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 23049 | if (!PyErr_Occurred()) | |||
| 23050 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.chemm to C/Fortran array" ); | |||
| 23051 | } else { | |||
| 23052 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 23053 | ||||
| 23054 | /* Processing variable b */ | |||
| 23055 | ; | |||
| 23056 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 23057 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 23058 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 23059 | if (!PyErr_Occurred()) | |||
| 23060 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.chemm to C/Fortran array" ); | |||
| 23061 | } else { | |||
| 23062 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 23063 | ||||
| 23064 | /* Processing variable lda */ | |||
| 23065 | lda = shape(a,0)a_Dims[0]; | |||
| 23066 | /* Processing variable ka */ | |||
| 23067 | ka = shape(a,1)a_Dims[1]; | |||
| 23068 | /* Processing variable ldb */ | |||
| 23069 | ldb = shape(b,0)b_Dims[0]; | |||
| 23070 | /* Processing variable kb */ | |||
| 23071 | kb = shape(b, 1)b_Dims[1]; | |||
| 23072 | /* Processing variable m */ | |||
| 23073 | m = (side ? ldb : lda); | |||
| 23074 | /* Processing variable n */ | |||
| 23075 | n = (side ? ka : kb); | |||
| 23076 | CHECKSCALAR(side? kb==lda : ka==ldb,"side? kb==lda : ka==ldb","hidden n","chemm:n=%d",n)if (!(side? kb==lda : ka==ldb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""chemm:n=%d", "(""side? kb==lda : ka==ldb"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 23077 | /* Processing variable c */ | |||
| 23078 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 23079 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 23080 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 23081 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 23082 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 23083 | if (!PyErr_Occurred()) | |||
| 23084 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.chemm to C/Fortran array" ); | |||
| 23085 | } else { | |||
| 23086 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 23087 | ||||
| 23088 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 23089 | /*end of frompyobj*/ | |||
| 23090 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23091 | f2py_start_call_clock(); | |||
| 23092 | #endif | |||
| 23093 | /*callfortranroutine*/ | |||
| 23094 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),&m,&n,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 23095 | /*(*f2py_func)(&m,&n,&alpha,a,b,&beta,c,&side,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 23096 | if (PyErr_Occurred()) | |||
| 23097 | f2py_success = 0; | |||
| 23098 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23099 | f2py_stop_call_clock(); | |||
| 23100 | #endif | |||
| 23101 | /*end of callfortranroutine*/ | |||
| 23102 | if (f2py_success) { | |||
| 23103 | /*pyobjfrom*/ | |||
| 23104 | /*end of pyobjfrom*/ | |||
| 23105 | CFUNCSMESS("Building return value.\n"); | |||
| 23106 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 23107 | /*closepyobjfrom*/ | |||
| 23108 | /*end of closepyobjfrom*/ | |||
| 23109 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 23110 | /*cleanupfrompyobj*/ | |||
| 23111 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 23112 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 23113 | /* End of cleaning variable c */ | |||
| 23114 | } /*CHECKSCALAR(side? kb==lda : ka==ldb)*/ | |||
| 23115 | /* End of cleaning variable n */ | |||
| 23116 | /* End of cleaning variable m */ | |||
| 23117 | /* End of cleaning variable kb */ | |||
| 23118 | /* End of cleaning variable ldb */ | |||
| 23119 | /* End of cleaning variable ka */ | |||
| 23120 | /* End of cleaning variable lda */ | |||
| 23121 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 23122 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 23123 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 23124 | /* End of cleaning variable b */ | |||
| 23125 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 23126 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 23127 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 23128 | /* End of cleaning variable a */ | |||
| 23129 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 23130 | /* End of cleaning variable beta */ | |||
| 23131 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 23132 | /* End of cleaning variable alpha */ | |||
| 23133 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 23134 | } /*if (f2py_success) of lower*/ | |||
| 23135 | /* End of cleaning variable lower */ | |||
| 23136 | } /*CHECKSCALAR(side==0||side==1)*/ | |||
| 23137 | } /*if (f2py_success) of side*/ | |||
| 23138 | /* End of cleaning variable side */ | |||
| 23139 | /*end of cleanupfrompyobj*/ | |||
| 23140 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 23141 | /*routdebugfailure*/ | |||
| 23142 | } else { | |||
| 23143 | /*routdebugleave*/ | |||
| 23144 | } | |||
| 23145 | CFUNCSMESS("Freeing memory.\n"); | |||
| 23146 | /*freemem*/ | |||
| 23147 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23148 | f2py_stop_clock(); | |||
| 23149 | #endif | |||
| 23150 | return capi_buildvalue; | |||
| 23151 | } | |||
| 23152 | /******************************** end of chemm ********************************/ | |||
| 23153 | ||||
| 23154 | /*********************************** zhemm ***********************************/ | |||
| 23155 | static char doc_f2py_rout__fblas_zhemm[] = "\ | |||
| 23156 | c = zhemm(alpha,a,b,[beta,c,side,lower,overwrite_c])\n\nWrapper for ``zhemm``.\ | |||
| 23157 | \n\nParameters\n----------\n" | |||
| 23158 | "alpha : input complex\n" | |||
| 23159 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 23160 | "b : input rank-2 array('D') with bounds (ldb,kb)\n" | |||
| 23161 | "\nOther Parameters\n----------------\n" | |||
| 23162 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 23163 | "c : input rank-2 array('D') with bounds (m,n)\n" | |||
| 23164 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 23165 | "side : input int, optional\n Default: 0\n" | |||
| 23166 | "lower : input int, optional\n Default: 0\n" | |||
| 23167 | "\nReturns\n-------\n" | |||
| 23168 | "c : rank-2 array('D') with bounds (m,n)"; | |||
| 23169 | /* extern void F_FUNC(zhemm,ZHEMM)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*, F_INT*,complex_double*,complex_double*,F_INT* ); */ | |||
| 23170 | static PyObject *f2py_rout__fblas_zhemm(const PyObject *capi_self, | |||
| 23171 | PyObject *capi_args, | |||
| 23172 | PyObject *capi_keywds, | |||
| 23173 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint*,complex_double*,complex_double*,F_INTint* )) { | |||
| 23174 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 23175 | volatile int f2py_success = 1; | |||
| 23176 | /*decl*/ | |||
| 23177 | ||||
| 23178 | int m = 0; | |||
| 23179 | int n = 0; | |||
| 23180 | complex_double alpha; | |||
| 23181 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 23182 | complex_double *a = NULL((void*)0); | |||
| 23183 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 23184 | const int a_Rank = 2; | |||
| 23185 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 23186 | int capi_a_intent = 0; | |||
| 23187 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 23188 | complex_double *b = NULL((void*)0); | |||
| 23189 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 23190 | const int b_Rank = 2; | |||
| 23191 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 23192 | int capi_b_intent = 0; | |||
| 23193 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 23194 | complex_double beta; | |||
| 23195 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 23196 | complex_double *c = NULL((void*)0); | |||
| 23197 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 23198 | const int c_Rank = 2; | |||
| 23199 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 23200 | int capi_c_intent = 0; | |||
| 23201 | int capi_overwrite_c = 0; | |||
| 23202 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 23203 | int side = 0; | |||
| 23204 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 23205 | int lower = 0; | |||
| 23206 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 23207 | int lda = 0; | |||
| 23208 | int ka = 0; | |||
| 23209 | int ldb = 0; | |||
| 23210 | int kb = 0; | |||
| 23211 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","side","lower","overwrite_c",NULL((void*)0)}; | |||
| 23212 | ||||
| 23213 | /*routdebugenter*/ | |||
| 23214 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23215 | f2py_start_clock(); | |||
| 23216 | #endif | |||
| 23217 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 23218 | "OOO|OOOOi:_fblas.zhemm",\ | |||
| 23219 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&side_capi,&lower_capi,&capi_overwrite_c)) | |||
| 23220 | return NULL((void*)0); | |||
| 23221 | /*frompyobj*/ | |||
| 23222 | /* Processing variable side */ | |||
| 23223 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 23224 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.zhemm() 3rd keyword (side) can't be converted to int"); | |||
| 23225 | if (f2py_success) { | |||
| 23226 | CHECKSCALAR(side==0||side==1,"side==0||side==1","3rd keyword side","zhemm:side=%d",side)if (!(side==0||side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhemm:side=%d", "(""side==0||side==1"") failed for " "3rd keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23227 | /* Processing variable lower */ | |||
| 23228 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 23229 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zhemm() 4th keyword (lower) can't be converted to int"); | |||
| 23230 | if (f2py_success) { | |||
| 23231 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","zhemm:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhemm:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23232 | /* Processing variable alpha */ | |||
| 23233 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zhemm() 1st argument (alpha) can't be converted to complex_double"); | |||
| 23234 | if (f2py_success) { | |||
| 23235 | /* Processing variable beta */ | |||
| 23236 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 23237 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zhemm() 1st keyword (beta) can't be converted to complex_double"); | |||
| 23238 | if (f2py_success) { | |||
| 23239 | /* Processing variable a */ | |||
| 23240 | ; | |||
| 23241 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 23242 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 23243 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 23244 | if (!PyErr_Occurred()) | |||
| 23245 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zhemm to C/Fortran array" ); | |||
| 23246 | } else { | |||
| 23247 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 23248 | ||||
| 23249 | /* Processing variable b */ | |||
| 23250 | ; | |||
| 23251 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 23252 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 23253 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 23254 | if (!PyErr_Occurred()) | |||
| 23255 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.zhemm to C/Fortran array" ); | |||
| 23256 | } else { | |||
| 23257 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 23258 | ||||
| 23259 | /* Processing variable lda */ | |||
| 23260 | lda = shape(a,0)a_Dims[0]; | |||
| 23261 | /* Processing variable ka */ | |||
| 23262 | ka = shape(a,1)a_Dims[1]; | |||
| 23263 | /* Processing variable ldb */ | |||
| 23264 | ldb = shape(b,0)b_Dims[0]; | |||
| 23265 | /* Processing variable kb */ | |||
| 23266 | kb = shape(b, 1)b_Dims[1]; | |||
| 23267 | /* Processing variable m */ | |||
| 23268 | m = (side ? ldb : lda); | |||
| 23269 | /* Processing variable n */ | |||
| 23270 | n = (side ? ka : kb); | |||
| 23271 | CHECKSCALAR(side? kb==lda : ka==ldb,"side? kb==lda : ka==ldb","hidden n","zhemm:n=%d",n)if (!(side? kb==lda : ka==ldb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zhemm:n=%d", "(""side? kb==lda : ka==ldb"") failed for " "hidden n", n); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 23272 | /* Processing variable c */ | |||
| 23273 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 23274 | c_Dims[0]=m,c_Dims[1]=n; | |||
| 23275 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 23276 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 23277 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 23278 | if (!PyErr_Occurred()) | |||
| 23279 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zhemm to C/Fortran array" ); | |||
| 23280 | } else { | |||
| 23281 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 23282 | ||||
| 23283 | CHECKARRAY(shape(c,0)==m && shape(c,1)==n,"shape(c,0)==m && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==m && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==m && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 23284 | /*end of frompyobj*/ | |||
| 23285 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23286 | f2py_start_call_clock(); | |||
| 23287 | #endif | |||
| 23288 | /*callfortranroutine*/ | |||
| 23289 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),&m,&n,&alpha,a,&lda,b,&ldb,&beta,c,&m) ; | |||
| 23290 | /*(*f2py_func)(&m,&n,&alpha,a,b,&beta,c,&side,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 23291 | if (PyErr_Occurred()) | |||
| 23292 | f2py_success = 0; | |||
| 23293 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23294 | f2py_stop_call_clock(); | |||
| 23295 | #endif | |||
| 23296 | /*end of callfortranroutine*/ | |||
| 23297 | if (f2py_success) { | |||
| 23298 | /*pyobjfrom*/ | |||
| 23299 | /*end of pyobjfrom*/ | |||
| 23300 | CFUNCSMESS("Building return value.\n"); | |||
| 23301 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 23302 | /*closepyobjfrom*/ | |||
| 23303 | /*end of closepyobjfrom*/ | |||
| 23304 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 23305 | /*cleanupfrompyobj*/ | |||
| 23306 | } /*CHECKARRAY(shape(c,0)==m && shape(c,1)==n)*/ | |||
| 23307 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 23308 | /* End of cleaning variable c */ | |||
| 23309 | } /*CHECKSCALAR(side? kb==lda : ka==ldb)*/ | |||
| 23310 | /* End of cleaning variable n */ | |||
| 23311 | /* End of cleaning variable m */ | |||
| 23312 | /* End of cleaning variable kb */ | |||
| 23313 | /* End of cleaning variable ldb */ | |||
| 23314 | /* End of cleaning variable ka */ | |||
| 23315 | /* End of cleaning variable lda */ | |||
| 23316 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 23317 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 23318 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 23319 | /* End of cleaning variable b */ | |||
| 23320 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 23321 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 23322 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 23323 | /* End of cleaning variable a */ | |||
| 23324 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 23325 | /* End of cleaning variable beta */ | |||
| 23326 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 23327 | /* End of cleaning variable alpha */ | |||
| 23328 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 23329 | } /*if (f2py_success) of lower*/ | |||
| 23330 | /* End of cleaning variable lower */ | |||
| 23331 | } /*CHECKSCALAR(side==0||side==1)*/ | |||
| 23332 | } /*if (f2py_success) of side*/ | |||
| 23333 | /* End of cleaning variable side */ | |||
| 23334 | /*end of cleanupfrompyobj*/ | |||
| 23335 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 23336 | /*routdebugfailure*/ | |||
| 23337 | } else { | |||
| 23338 | /*routdebugleave*/ | |||
| 23339 | } | |||
| 23340 | CFUNCSMESS("Freeing memory.\n"); | |||
| 23341 | /*freemem*/ | |||
| 23342 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23343 | f2py_stop_clock(); | |||
| 23344 | #endif | |||
| 23345 | return capi_buildvalue; | |||
| 23346 | } | |||
| 23347 | /******************************** end of zhemm ********************************/ | |||
| 23348 | ||||
| 23349 | /*********************************** ssyrk ***********************************/ | |||
| 23350 | static char doc_f2py_rout__fblas_ssyrk[] = "\ | |||
| 23351 | c = ssyrk(alpha,a,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``ssyrk``.\ | |||
| 23352 | \n\nParameters\n----------\n" | |||
| 23353 | "alpha : input float\n" | |||
| 23354 | "a : input rank-2 array('f') with bounds (lda,ka)\n" | |||
| 23355 | "\nOther Parameters\n----------------\n" | |||
| 23356 | "beta : input float, optional\n Default: 0.0\n" | |||
| 23357 | "c : input rank-2 array('f') with bounds (n,n)\n" | |||
| 23358 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 23359 | "trans : input int, optional\n Default: 0\n" | |||
| 23360 | "lower : input int, optional\n Default: 0\n" | |||
| 23361 | "\nReturns\n-------\n" | |||
| 23362 | "c : rank-2 array('f') with bounds (n,n)"; | |||
| 23363 | /* extern void F_FUNC(ssyrk,SSYRK)(char*,char*,F_INT*,F_INT*,float*,float*,F_INT*,float*, float*,F_INT* ); */ | |||
| 23364 | static PyObject *f2py_rout__fblas_ssyrk(const PyObject *capi_self, | |||
| 23365 | PyObject *capi_args, | |||
| 23366 | PyObject *capi_keywds, | |||
| 23367 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*, float*,F_INTint* )) { | |||
| 23368 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 23369 | volatile int f2py_success = 1; | |||
| 23370 | /*decl*/ | |||
| 23371 | ||||
| 23372 | int n = 0; | |||
| 23373 | int k = 0; | |||
| 23374 | float alpha = 0; | |||
| 23375 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 23376 | float *a = NULL((void*)0); | |||
| 23377 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 23378 | const int a_Rank = 2; | |||
| 23379 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 23380 | int capi_a_intent = 0; | |||
| 23381 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 23382 | float beta = 0; | |||
| 23383 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 23384 | float *c = NULL((void*)0); | |||
| 23385 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 23386 | const int c_Rank = 2; | |||
| 23387 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 23388 | int capi_c_intent = 0; | |||
| 23389 | int capi_overwrite_c = 0; | |||
| 23390 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 23391 | int trans = 0; | |||
| 23392 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 23393 | int lower = 0; | |||
| 23394 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 23395 | int lda = 0; | |||
| 23396 | int ka = 0; | |||
| 23397 | static char *capi_kwlist[] = {"alpha","a","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 23398 | ||||
| 23399 | /*routdebugenter*/ | |||
| 23400 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23401 | f2py_start_clock(); | |||
| 23402 | #endif | |||
| 23403 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 23404 | "OO|OOOOi:_fblas.ssyrk",\ | |||
| 23405 | capi_kwlist,&alpha_capi,&a_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 23406 | return NULL((void*)0); | |||
| 23407 | /*frompyobj*/ | |||
| 23408 | /* Processing variable lower */ | |||
| 23409 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 23410 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssyrk() 4th keyword (lower) can't be converted to int"); | |||
| 23411 | if (f2py_success) { | |||
| 23412 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","ssyrk:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyrk:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23413 | /* Processing variable trans */ | |||
| 23414 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 23415 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ssyrk() 3rd keyword (trans) can't be converted to int"); | |||
| 23416 | if (f2py_success) { | |||
| 23417 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","ssyrk:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ssyrk:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 23418 | /* Processing variable alpha */ | |||
| 23419 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssyrk() 1st argument (alpha) can't be converted to float"); | |||
| 23420 | if (f2py_success) { | |||
| 23421 | /* Processing variable beta */ | |||
| 23422 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 23423 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.ssyrk() 1st keyword (beta) can't be converted to float"); | |||
| 23424 | if (f2py_success) { | |||
| 23425 | /* Processing variable a */ | |||
| 23426 | ; | |||
| 23427 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 23428 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 23429 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 23430 | if (!PyErr_Occurred()) | |||
| 23431 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ssyrk to C/Fortran array" ); | |||
| 23432 | } else { | |||
| 23433 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 23434 | ||||
| 23435 | /* Processing variable lda */ | |||
| 23436 | lda = shape(a,0)a_Dims[0]; | |||
| 23437 | /* Processing variable ka */ | |||
| 23438 | ka = shape(a,1)a_Dims[1]; | |||
| 23439 | /* Processing variable n */ | |||
| 23440 | n = (trans ? ka : lda); | |||
| 23441 | /* Processing variable k */ | |||
| 23442 | k = (trans ? lda : ka); | |||
| 23443 | /* Processing variable c */ | |||
| 23444 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 23445 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 23446 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 23447 | capi_c_tmp = array_from_pyobj(NPY_FLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 23448 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 23449 | if (!PyErr_Occurred()) | |||
| 23450 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.ssyrk to C/Fortran array" ); | |||
| 23451 | } else { | |||
| 23452 | c = (float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 23453 | ||||
| 23454 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 23455 | /*end of frompyobj*/ | |||
| 23456 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23457 | f2py_start_call_clock(); | |||
| 23458 | #endif | |||
| 23459 | /*callfortranroutine*/ | |||
| 23460 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,&beta,c,&n) ; | |||
| 23461 | /*(*f2py_func)(&n,&k,&alpha,a,&beta,c,&trans,&lower,&lda,&ka);*/ | |||
| 23462 | if (PyErr_Occurred()) | |||
| 23463 | f2py_success = 0; | |||
| 23464 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23465 | f2py_stop_call_clock(); | |||
| 23466 | #endif | |||
| 23467 | /*end of callfortranroutine*/ | |||
| 23468 | if (f2py_success) { | |||
| 23469 | /*pyobjfrom*/ | |||
| 23470 | /*end of pyobjfrom*/ | |||
| 23471 | CFUNCSMESS("Building return value.\n"); | |||
| 23472 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 23473 | /*closepyobjfrom*/ | |||
| 23474 | /*end of closepyobjfrom*/ | |||
| 23475 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 23476 | /*cleanupfrompyobj*/ | |||
| 23477 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 23478 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 23479 | /* End of cleaning variable c */ | |||
| 23480 | /* End of cleaning variable k */ | |||
| 23481 | /* End of cleaning variable n */ | |||
| 23482 | /* End of cleaning variable ka */ | |||
| 23483 | /* End of cleaning variable lda */ | |||
| 23484 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 23485 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 23486 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 23487 | /* End of cleaning variable a */ | |||
| 23488 | } /*if (f2py_success) of beta*/ | |||
| 23489 | /* End of cleaning variable beta */ | |||
| 23490 | } /*if (f2py_success) of alpha*/ | |||
| 23491 | /* End of cleaning variable alpha */ | |||
| 23492 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 23493 | } /*if (f2py_success) of trans*/ | |||
| 23494 | /* End of cleaning variable trans */ | |||
| 23495 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 23496 | } /*if (f2py_success) of lower*/ | |||
| 23497 | /* End of cleaning variable lower */ | |||
| 23498 | /*end of cleanupfrompyobj*/ | |||
| 23499 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 23500 | /*routdebugfailure*/ | |||
| 23501 | } else { | |||
| 23502 | /*routdebugleave*/ | |||
| 23503 | } | |||
| 23504 | CFUNCSMESS("Freeing memory.\n"); | |||
| 23505 | /*freemem*/ | |||
| 23506 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23507 | f2py_stop_clock(); | |||
| 23508 | #endif | |||
| 23509 | return capi_buildvalue; | |||
| 23510 | } | |||
| 23511 | /******************************** end of ssyrk ********************************/ | |||
| 23512 | ||||
| 23513 | /*********************************** dsyrk ***********************************/ | |||
| 23514 | static char doc_f2py_rout__fblas_dsyrk[] = "\ | |||
| 23515 | c = dsyrk(alpha,a,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``dsyrk``.\ | |||
| 23516 | \n\nParameters\n----------\n" | |||
| 23517 | "alpha : input float\n" | |||
| 23518 | "a : input rank-2 array('d') with bounds (lda,ka)\n" | |||
| 23519 | "\nOther Parameters\n----------------\n" | |||
| 23520 | "beta : input float, optional\n Default: 0.0\n" | |||
| 23521 | "c : input rank-2 array('d') with bounds (n,n)\n" | |||
| 23522 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 23523 | "trans : input int, optional\n Default: 0\n" | |||
| 23524 | "lower : input int, optional\n Default: 0\n" | |||
| 23525 | "\nReturns\n-------\n" | |||
| 23526 | "c : rank-2 array('d') with bounds (n,n)"; | |||
| 23527 | /* extern void F_FUNC(dsyrk,DSYRK)(char*,char*,F_INT*,F_INT*,double*,double*,F_INT*,double*, double*,F_INT* ); */ | |||
| 23528 | static PyObject *f2py_rout__fblas_dsyrk(const PyObject *capi_self, | |||
| 23529 | PyObject *capi_args, | |||
| 23530 | PyObject *capi_keywds, | |||
| 23531 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*, double*,F_INTint* )) { | |||
| 23532 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 23533 | volatile int f2py_success = 1; | |||
| 23534 | /*decl*/ | |||
| 23535 | ||||
| 23536 | int n = 0; | |||
| 23537 | int k = 0; | |||
| 23538 | double alpha = 0; | |||
| 23539 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 23540 | double *a = NULL((void*)0); | |||
| 23541 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 23542 | const int a_Rank = 2; | |||
| 23543 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 23544 | int capi_a_intent = 0; | |||
| 23545 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 23546 | double beta = 0; | |||
| 23547 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 23548 | double *c = NULL((void*)0); | |||
| 23549 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 23550 | const int c_Rank = 2; | |||
| 23551 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 23552 | int capi_c_intent = 0; | |||
| 23553 | int capi_overwrite_c = 0; | |||
| 23554 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 23555 | int trans = 0; | |||
| 23556 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 23557 | int lower = 0; | |||
| 23558 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 23559 | int lda = 0; | |||
| 23560 | int ka = 0; | |||
| 23561 | static char *capi_kwlist[] = {"alpha","a","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 23562 | ||||
| 23563 | /*routdebugenter*/ | |||
| 23564 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23565 | f2py_start_clock(); | |||
| 23566 | #endif | |||
| 23567 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 23568 | "OO|OOOOi:_fblas.dsyrk",\ | |||
| 23569 | capi_kwlist,&alpha_capi,&a_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 23570 | return NULL((void*)0); | |||
| 23571 | /*frompyobj*/ | |||
| 23572 | /* Processing variable lower */ | |||
| 23573 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 23574 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsyrk() 4th keyword (lower) can't be converted to int"); | |||
| 23575 | if (f2py_success) { | |||
| 23576 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","dsyrk:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyrk:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23577 | /* Processing variable trans */ | |||
| 23578 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 23579 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dsyrk() 3rd keyword (trans) can't be converted to int"); | |||
| 23580 | if (f2py_success) { | |||
| 23581 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","dsyrk:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dsyrk:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 23582 | /* Processing variable alpha */ | |||
| 23583 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsyrk() 1st argument (alpha) can't be converted to double"); | |||
| 23584 | if (f2py_success) { | |||
| 23585 | /* Processing variable beta */ | |||
| 23586 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 23587 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dsyrk() 1st keyword (beta) can't be converted to double"); | |||
| 23588 | if (f2py_success) { | |||
| 23589 | /* Processing variable a */ | |||
| 23590 | ; | |||
| 23591 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 23592 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 23593 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 23594 | if (!PyErr_Occurred()) | |||
| 23595 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dsyrk to C/Fortran array" ); | |||
| 23596 | } else { | |||
| 23597 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 23598 | ||||
| 23599 | /* Processing variable lda */ | |||
| 23600 | lda = shape(a,0)a_Dims[0]; | |||
| 23601 | /* Processing variable ka */ | |||
| 23602 | ka = shape(a,1)a_Dims[1]; | |||
| 23603 | /* Processing variable n */ | |||
| 23604 | n = (trans ? ka : lda); | |||
| 23605 | /* Processing variable k */ | |||
| 23606 | k = (trans ? lda : ka); | |||
| 23607 | /* Processing variable c */ | |||
| 23608 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 23609 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 23610 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 23611 | capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 23612 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 23613 | if (!PyErr_Occurred()) | |||
| 23614 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.dsyrk to C/Fortran array" ); | |||
| 23615 | } else { | |||
| 23616 | c = (double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 23617 | ||||
| 23618 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 23619 | /*end of frompyobj*/ | |||
| 23620 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23621 | f2py_start_call_clock(); | |||
| 23622 | #endif | |||
| 23623 | /*callfortranroutine*/ | |||
| 23624 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,&beta,c,&n) ; | |||
| 23625 | /*(*f2py_func)(&n,&k,&alpha,a,&beta,c,&trans,&lower,&lda,&ka);*/ | |||
| 23626 | if (PyErr_Occurred()) | |||
| 23627 | f2py_success = 0; | |||
| 23628 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23629 | f2py_stop_call_clock(); | |||
| 23630 | #endif | |||
| 23631 | /*end of callfortranroutine*/ | |||
| 23632 | if (f2py_success) { | |||
| 23633 | /*pyobjfrom*/ | |||
| 23634 | /*end of pyobjfrom*/ | |||
| 23635 | CFUNCSMESS("Building return value.\n"); | |||
| 23636 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 23637 | /*closepyobjfrom*/ | |||
| 23638 | /*end of closepyobjfrom*/ | |||
| 23639 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 23640 | /*cleanupfrompyobj*/ | |||
| 23641 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 23642 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 23643 | /* End of cleaning variable c */ | |||
| 23644 | /* End of cleaning variable k */ | |||
| 23645 | /* End of cleaning variable n */ | |||
| 23646 | /* End of cleaning variable ka */ | |||
| 23647 | /* End of cleaning variable lda */ | |||
| 23648 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 23649 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 23650 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 23651 | /* End of cleaning variable a */ | |||
| 23652 | } /*if (f2py_success) of beta*/ | |||
| 23653 | /* End of cleaning variable beta */ | |||
| 23654 | } /*if (f2py_success) of alpha*/ | |||
| 23655 | /* End of cleaning variable alpha */ | |||
| 23656 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 23657 | } /*if (f2py_success) of trans*/ | |||
| 23658 | /* End of cleaning variable trans */ | |||
| 23659 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 23660 | } /*if (f2py_success) of lower*/ | |||
| 23661 | /* End of cleaning variable lower */ | |||
| 23662 | /*end of cleanupfrompyobj*/ | |||
| 23663 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 23664 | /*routdebugfailure*/ | |||
| 23665 | } else { | |||
| 23666 | /*routdebugleave*/ | |||
| 23667 | } | |||
| 23668 | CFUNCSMESS("Freeing memory.\n"); | |||
| 23669 | /*freemem*/ | |||
| 23670 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23671 | f2py_stop_clock(); | |||
| 23672 | #endif | |||
| 23673 | return capi_buildvalue; | |||
| 23674 | } | |||
| 23675 | /******************************** end of dsyrk ********************************/ | |||
| 23676 | ||||
| 23677 | /*********************************** csyrk ***********************************/ | |||
| 23678 | static char doc_f2py_rout__fblas_csyrk[] = "\ | |||
| 23679 | c = csyrk(alpha,a,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``csyrk``.\ | |||
| 23680 | \n\nParameters\n----------\n" | |||
| 23681 | "alpha : input complex\n" | |||
| 23682 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 23683 | "\nOther Parameters\n----------------\n" | |||
| 23684 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 23685 | "c : input rank-2 array('F') with bounds (n,n)\n" | |||
| 23686 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 23687 | "trans : input int, optional\n Default: 0\n" | |||
| 23688 | "lower : input int, optional\n Default: 0\n" | |||
| 23689 | "\nReturns\n-------\n" | |||
| 23690 | "c : rank-2 array('F') with bounds (n,n)"; | |||
| 23691 | /* extern void F_FUNC(csyrk,CSYRK)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*, complex_float*,F_INT* ); */ | |||
| 23692 | static PyObject *f2py_rout__fblas_csyrk(const PyObject *capi_self, | |||
| 23693 | PyObject *capi_args, | |||
| 23694 | PyObject *capi_keywds, | |||
| 23695 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* )) { | |||
| 23696 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 23697 | volatile int f2py_success = 1; | |||
| 23698 | /*decl*/ | |||
| 23699 | ||||
| 23700 | int n = 0; | |||
| 23701 | int k = 0; | |||
| 23702 | complex_float alpha; | |||
| 23703 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 23704 | complex_float *a = NULL((void*)0); | |||
| 23705 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 23706 | const int a_Rank = 2; | |||
| 23707 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 23708 | int capi_a_intent = 0; | |||
| 23709 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 23710 | complex_float beta; | |||
| 23711 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 23712 | complex_float *c = NULL((void*)0); | |||
| 23713 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 23714 | const int c_Rank = 2; | |||
| 23715 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 23716 | int capi_c_intent = 0; | |||
| 23717 | int capi_overwrite_c = 0; | |||
| 23718 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 23719 | int trans = 0; | |||
| 23720 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 23721 | int lower = 0; | |||
| 23722 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 23723 | int lda = 0; | |||
| 23724 | int ka = 0; | |||
| 23725 | static char *capi_kwlist[] = {"alpha","a","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 23726 | ||||
| 23727 | /*routdebugenter*/ | |||
| 23728 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23729 | f2py_start_clock(); | |||
| 23730 | #endif | |||
| 23731 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 23732 | "OO|OOOOi:_fblas.csyrk",\ | |||
| 23733 | capi_kwlist,&alpha_capi,&a_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 23734 | return NULL((void*)0); | |||
| 23735 | /*frompyobj*/ | |||
| 23736 | /* Processing variable lower */ | |||
| 23737 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 23738 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.csyrk() 4th keyword (lower) can't be converted to int"); | |||
| 23739 | if (f2py_success) { | |||
| 23740 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","csyrk:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csyrk:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23741 | /* Processing variable trans */ | |||
| 23742 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 23743 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.csyrk() 3rd keyword (trans) can't be converted to int"); | |||
| 23744 | if (f2py_success) { | |||
| 23745 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","csyrk:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csyrk:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 23746 | /* Processing variable alpha */ | |||
| 23747 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.csyrk() 1st argument (alpha) can't be converted to complex_float"); | |||
| 23748 | if (f2py_success) { | |||
| 23749 | /* Processing variable beta */ | |||
| 23750 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 23751 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.csyrk() 1st keyword (beta) can't be converted to complex_float"); | |||
| 23752 | if (f2py_success) { | |||
| 23753 | /* Processing variable a */ | |||
| 23754 | ; | |||
| 23755 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 23756 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 23757 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 23758 | if (!PyErr_Occurred()) | |||
| 23759 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.csyrk to C/Fortran array" ); | |||
| 23760 | } else { | |||
| 23761 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 23762 | ||||
| 23763 | /* Processing variable lda */ | |||
| 23764 | lda = shape(a,0)a_Dims[0]; | |||
| 23765 | /* Processing variable ka */ | |||
| 23766 | ka = shape(a,1)a_Dims[1]; | |||
| 23767 | /* Processing variable n */ | |||
| 23768 | n = (trans ? ka : lda); | |||
| 23769 | /* Processing variable k */ | |||
| 23770 | k = (trans ? lda : ka); | |||
| 23771 | /* Processing variable c */ | |||
| 23772 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 23773 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 23774 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 23775 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 23776 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 23777 | if (!PyErr_Occurred()) | |||
| 23778 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.csyrk to C/Fortran array" ); | |||
| 23779 | } else { | |||
| 23780 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 23781 | ||||
| 23782 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 23783 | /*end of frompyobj*/ | |||
| 23784 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23785 | f2py_start_call_clock(); | |||
| 23786 | #endif | |||
| 23787 | /*callfortranroutine*/ | |||
| 23788 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,&beta,c,&n) ; | |||
| 23789 | /*(*f2py_func)(&n,&k,&alpha,a,&beta,c,&trans,&lower,&lda,&ka);*/ | |||
| 23790 | if (PyErr_Occurred()) | |||
| 23791 | f2py_success = 0; | |||
| 23792 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23793 | f2py_stop_call_clock(); | |||
| 23794 | #endif | |||
| 23795 | /*end of callfortranroutine*/ | |||
| 23796 | if (f2py_success) { | |||
| 23797 | /*pyobjfrom*/ | |||
| 23798 | /*end of pyobjfrom*/ | |||
| 23799 | CFUNCSMESS("Building return value.\n"); | |||
| 23800 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 23801 | /*closepyobjfrom*/ | |||
| 23802 | /*end of closepyobjfrom*/ | |||
| 23803 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 23804 | /*cleanupfrompyobj*/ | |||
| 23805 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 23806 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 23807 | /* End of cleaning variable c */ | |||
| 23808 | /* End of cleaning variable k */ | |||
| 23809 | /* End of cleaning variable n */ | |||
| 23810 | /* End of cleaning variable ka */ | |||
| 23811 | /* End of cleaning variable lda */ | |||
| 23812 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 23813 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 23814 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 23815 | /* End of cleaning variable a */ | |||
| 23816 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 23817 | /* End of cleaning variable beta */ | |||
| 23818 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 23819 | /* End of cleaning variable alpha */ | |||
| 23820 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 23821 | } /*if (f2py_success) of trans*/ | |||
| 23822 | /* End of cleaning variable trans */ | |||
| 23823 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 23824 | } /*if (f2py_success) of lower*/ | |||
| 23825 | /* End of cleaning variable lower */ | |||
| 23826 | /*end of cleanupfrompyobj*/ | |||
| 23827 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 23828 | /*routdebugfailure*/ | |||
| 23829 | } else { | |||
| 23830 | /*routdebugleave*/ | |||
| 23831 | } | |||
| 23832 | CFUNCSMESS("Freeing memory.\n"); | |||
| 23833 | /*freemem*/ | |||
| 23834 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23835 | f2py_stop_clock(); | |||
| 23836 | #endif | |||
| 23837 | return capi_buildvalue; | |||
| 23838 | } | |||
| 23839 | /******************************** end of csyrk ********************************/ | |||
| 23840 | ||||
| 23841 | /*********************************** zsyrk ***********************************/ | |||
| 23842 | static char doc_f2py_rout__fblas_zsyrk[] = "\ | |||
| 23843 | c = zsyrk(alpha,a,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``zsyrk``.\ | |||
| 23844 | \n\nParameters\n----------\n" | |||
| 23845 | "alpha : input complex\n" | |||
| 23846 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 23847 | "\nOther Parameters\n----------------\n" | |||
| 23848 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 23849 | "c : input rank-2 array('D') with bounds (n,n)\n" | |||
| 23850 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 23851 | "trans : input int, optional\n Default: 0\n" | |||
| 23852 | "lower : input int, optional\n Default: 0\n" | |||
| 23853 | "\nReturns\n-------\n" | |||
| 23854 | "c : rank-2 array('D') with bounds (n,n)"; | |||
| 23855 | /* extern void F_FUNC(zsyrk,ZSYRK)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*, complex_double*,F_INT* ); */ | |||
| 23856 | static PyObject *f2py_rout__fblas_zsyrk(const PyObject *capi_self, | |||
| 23857 | PyObject *capi_args, | |||
| 23858 | PyObject *capi_keywds, | |||
| 23859 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* )) { | |||
| 23860 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 23861 | volatile int f2py_success = 1; | |||
| 23862 | /*decl*/ | |||
| 23863 | ||||
| 23864 | int n = 0; | |||
| 23865 | int k = 0; | |||
| 23866 | complex_double alpha; | |||
| 23867 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 23868 | complex_double *a = NULL((void*)0); | |||
| 23869 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 23870 | const int a_Rank = 2; | |||
| 23871 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 23872 | int capi_a_intent = 0; | |||
| 23873 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 23874 | complex_double beta; | |||
| 23875 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 23876 | complex_double *c = NULL((void*)0); | |||
| 23877 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 23878 | const int c_Rank = 2; | |||
| 23879 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 23880 | int capi_c_intent = 0; | |||
| 23881 | int capi_overwrite_c = 0; | |||
| 23882 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 23883 | int trans = 0; | |||
| 23884 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 23885 | int lower = 0; | |||
| 23886 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 23887 | int lda = 0; | |||
| 23888 | int ka = 0; | |||
| 23889 | static char *capi_kwlist[] = {"alpha","a","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 23890 | ||||
| 23891 | /*routdebugenter*/ | |||
| 23892 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23893 | f2py_start_clock(); | |||
| 23894 | #endif | |||
| 23895 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 23896 | "OO|OOOOi:_fblas.zsyrk",\ | |||
| 23897 | capi_kwlist,&alpha_capi,&a_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 23898 | return NULL((void*)0); | |||
| 23899 | /*frompyobj*/ | |||
| 23900 | /* Processing variable lower */ | |||
| 23901 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 23902 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zsyrk() 4th keyword (lower) can't be converted to int"); | |||
| 23903 | if (f2py_success) { | |||
| 23904 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","zsyrk:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsyrk:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 23905 | /* Processing variable trans */ | |||
| 23906 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 23907 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.zsyrk() 3rd keyword (trans) can't be converted to int"); | |||
| 23908 | if (f2py_success) { | |||
| 23909 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","zsyrk:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zsyrk:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 23910 | /* Processing variable alpha */ | |||
| 23911 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zsyrk() 1st argument (alpha) can't be converted to complex_double"); | |||
| 23912 | if (f2py_success) { | |||
| 23913 | /* Processing variable beta */ | |||
| 23914 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 23915 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zsyrk() 1st keyword (beta) can't be converted to complex_double"); | |||
| 23916 | if (f2py_success) { | |||
| 23917 | /* Processing variable a */ | |||
| 23918 | ; | |||
| 23919 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 23920 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 23921 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 23922 | if (!PyErr_Occurred()) | |||
| 23923 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zsyrk to C/Fortran array" ); | |||
| 23924 | } else { | |||
| 23925 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 23926 | ||||
| 23927 | /* Processing variable lda */ | |||
| 23928 | lda = shape(a,0)a_Dims[0]; | |||
| 23929 | /* Processing variable ka */ | |||
| 23930 | ka = shape(a,1)a_Dims[1]; | |||
| 23931 | /* Processing variable n */ | |||
| 23932 | n = (trans ? ka : lda); | |||
| 23933 | /* Processing variable k */ | |||
| 23934 | k = (trans ? lda : ka); | |||
| 23935 | /* Processing variable c */ | |||
| 23936 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 23937 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 23938 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 23939 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 23940 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 23941 | if (!PyErr_Occurred()) | |||
| 23942 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zsyrk to C/Fortran array" ); | |||
| 23943 | } else { | |||
| 23944 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 23945 | ||||
| 23946 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 23947 | /*end of frompyobj*/ | |||
| 23948 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23949 | f2py_start_call_clock(); | |||
| 23950 | #endif | |||
| 23951 | /*callfortranroutine*/ | |||
| 23952 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,&beta,c,&n) ; | |||
| 23953 | /*(*f2py_func)(&n,&k,&alpha,a,&beta,c,&trans,&lower,&lda,&ka);*/ | |||
| 23954 | if (PyErr_Occurred()) | |||
| 23955 | f2py_success = 0; | |||
| 23956 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23957 | f2py_stop_call_clock(); | |||
| 23958 | #endif | |||
| 23959 | /*end of callfortranroutine*/ | |||
| 23960 | if (f2py_success) { | |||
| 23961 | /*pyobjfrom*/ | |||
| 23962 | /*end of pyobjfrom*/ | |||
| 23963 | CFUNCSMESS("Building return value.\n"); | |||
| 23964 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 23965 | /*closepyobjfrom*/ | |||
| 23966 | /*end of closepyobjfrom*/ | |||
| 23967 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 23968 | /*cleanupfrompyobj*/ | |||
| 23969 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 23970 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 23971 | /* End of cleaning variable c */ | |||
| 23972 | /* End of cleaning variable k */ | |||
| 23973 | /* End of cleaning variable n */ | |||
| 23974 | /* End of cleaning variable ka */ | |||
| 23975 | /* End of cleaning variable lda */ | |||
| 23976 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 23977 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 23978 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 23979 | /* End of cleaning variable a */ | |||
| 23980 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 23981 | /* End of cleaning variable beta */ | |||
| 23982 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 23983 | /* End of cleaning variable alpha */ | |||
| 23984 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 23985 | } /*if (f2py_success) of trans*/ | |||
| 23986 | /* End of cleaning variable trans */ | |||
| 23987 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 23988 | } /*if (f2py_success) of lower*/ | |||
| 23989 | /* End of cleaning variable lower */ | |||
| 23990 | /*end of cleanupfrompyobj*/ | |||
| 23991 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 23992 | /*routdebugfailure*/ | |||
| 23993 | } else { | |||
| 23994 | /*routdebugleave*/ | |||
| 23995 | } | |||
| 23996 | CFUNCSMESS("Freeing memory.\n"); | |||
| 23997 | /*freemem*/ | |||
| 23998 | #ifdef F2PY_REPORT_ATEXIT | |||
| 23999 | f2py_stop_clock(); | |||
| 24000 | #endif | |||
| 24001 | return capi_buildvalue; | |||
| 24002 | } | |||
| 24003 | /******************************** end of zsyrk ********************************/ | |||
| 24004 | ||||
| 24005 | /*********************************** cherk ***********************************/ | |||
| 24006 | static char doc_f2py_rout__fblas_cherk[] = "\ | |||
| 24007 | c = cherk(alpha,a,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``cherk``.\ | |||
| 24008 | \n\nParameters\n----------\n" | |||
| 24009 | "alpha : input complex\n" | |||
| 24010 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 24011 | "\nOther Parameters\n----------------\n" | |||
| 24012 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 24013 | "c : input rank-2 array('F') with bounds (n,n)\n" | |||
| 24014 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 24015 | "trans : input int, optional\n Default: 0\n" | |||
| 24016 | "lower : input int, optional\n Default: 0\n" | |||
| 24017 | "\nReturns\n-------\n" | |||
| 24018 | "c : rank-2 array('F') with bounds (n,n)"; | |||
| 24019 | /* extern void F_FUNC(cherk,CHERK)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*, complex_float*,F_INT* ); */ | |||
| 24020 | static PyObject *f2py_rout__fblas_cherk(const PyObject *capi_self, | |||
| 24021 | PyObject *capi_args, | |||
| 24022 | PyObject *capi_keywds, | |||
| 24023 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*, complex_float*,F_INTint* )) { | |||
| 24024 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 24025 | volatile int f2py_success = 1; | |||
| 24026 | /*decl*/ | |||
| 24027 | ||||
| 24028 | int n = 0; | |||
| 24029 | int k = 0; | |||
| 24030 | complex_float alpha; | |||
| 24031 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 24032 | complex_float *a = NULL((void*)0); | |||
| 24033 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 24034 | const int a_Rank = 2; | |||
| 24035 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 24036 | int capi_a_intent = 0; | |||
| 24037 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 24038 | complex_float beta; | |||
| 24039 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 24040 | complex_float *c = NULL((void*)0); | |||
| 24041 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 24042 | const int c_Rank = 2; | |||
| 24043 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 24044 | int capi_c_intent = 0; | |||
| 24045 | int capi_overwrite_c = 0; | |||
| 24046 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 24047 | int trans = 0; | |||
| 24048 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 24049 | int lower = 0; | |||
| 24050 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 24051 | int lda = 0; | |||
| 24052 | int ka = 0; | |||
| 24053 | static char *capi_kwlist[] = {"alpha","a","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 24054 | ||||
| 24055 | /*routdebugenter*/ | |||
| 24056 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24057 | f2py_start_clock(); | |||
| 24058 | #endif | |||
| 24059 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 24060 | "OO|OOOOi:_fblas.cherk",\ | |||
| 24061 | capi_kwlist,&alpha_capi,&a_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 24062 | return NULL((void*)0); | |||
| 24063 | /*frompyobj*/ | |||
| 24064 | /* Processing variable lower */ | |||
| 24065 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 24066 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.cherk() 4th keyword (lower) can't be converted to int"); | |||
| 24067 | if (f2py_success) { | |||
| 24068 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","cherk:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cherk:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 24069 | /* Processing variable trans */ | |||
| 24070 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 24071 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.cherk() 3rd keyword (trans) can't be converted to int"); | |||
| 24072 | if (f2py_success) { | |||
| 24073 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","cherk:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cherk:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 24074 | /* Processing variable alpha */ | |||
| 24075 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cherk() 1st argument (alpha) can't be converted to complex_float"); | |||
| 24076 | if (f2py_success) { | |||
| 24077 | /* Processing variable beta */ | |||
| 24078 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 24079 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.cherk() 1st keyword (beta) can't be converted to complex_float"); | |||
| 24080 | if (f2py_success) { | |||
| 24081 | /* Processing variable a */ | |||
| 24082 | ; | |||
| 24083 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 24084 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 24085 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 24086 | if (!PyErr_Occurred()) | |||
| 24087 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.cherk to C/Fortran array" ); | |||
| 24088 | } else { | |||
| 24089 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 24090 | ||||
| 24091 | /* Processing variable lda */ | |||
| 24092 | lda = shape(a,0)a_Dims[0]; | |||
| 24093 | /* Processing variable ka */ | |||
| 24094 | ka = shape(a,1)a_Dims[1]; | |||
| 24095 | /* Processing variable n */ | |||
| 24096 | n = (trans ? ka : lda); | |||
| 24097 | /* Processing variable k */ | |||
| 24098 | k = (trans ? lda : ka); | |||
| 24099 | /* Processing variable c */ | |||
| 24100 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 24101 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 24102 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 24103 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 24104 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 24105 | if (!PyErr_Occurred()) | |||
| 24106 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.cherk to C/Fortran array" ); | |||
| 24107 | } else { | |||
| 24108 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 24109 | ||||
| 24110 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 24111 | /*end of frompyobj*/ | |||
| 24112 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24113 | f2py_start_call_clock(); | |||
| 24114 | #endif | |||
| 24115 | /*callfortranroutine*/ | |||
| 24116 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,&beta,c,&n) ; | |||
| 24117 | /*(*f2py_func)(&n,&k,&alpha,a,&beta,c,&trans,&lower,&lda,&ka);*/ | |||
| 24118 | if (PyErr_Occurred()) | |||
| 24119 | f2py_success = 0; | |||
| 24120 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24121 | f2py_stop_call_clock(); | |||
| 24122 | #endif | |||
| 24123 | /*end of callfortranroutine*/ | |||
| 24124 | if (f2py_success) { | |||
| 24125 | /*pyobjfrom*/ | |||
| 24126 | /*end of pyobjfrom*/ | |||
| 24127 | CFUNCSMESS("Building return value.\n"); | |||
| 24128 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 24129 | /*closepyobjfrom*/ | |||
| 24130 | /*end of closepyobjfrom*/ | |||
| 24131 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 24132 | /*cleanupfrompyobj*/ | |||
| 24133 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 24134 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 24135 | /* End of cleaning variable c */ | |||
| 24136 | /* End of cleaning variable k */ | |||
| 24137 | /* End of cleaning variable n */ | |||
| 24138 | /* End of cleaning variable ka */ | |||
| 24139 | /* End of cleaning variable lda */ | |||
| 24140 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 24141 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 24142 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 24143 | /* End of cleaning variable a */ | |||
| 24144 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 24145 | /* End of cleaning variable beta */ | |||
| 24146 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 24147 | /* End of cleaning variable alpha */ | |||
| 24148 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 24149 | } /*if (f2py_success) of trans*/ | |||
| 24150 | /* End of cleaning variable trans */ | |||
| 24151 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 24152 | } /*if (f2py_success) of lower*/ | |||
| 24153 | /* End of cleaning variable lower */ | |||
| 24154 | /*end of cleanupfrompyobj*/ | |||
| 24155 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 24156 | /*routdebugfailure*/ | |||
| 24157 | } else { | |||
| 24158 | /*routdebugleave*/ | |||
| 24159 | } | |||
| 24160 | CFUNCSMESS("Freeing memory.\n"); | |||
| 24161 | /*freemem*/ | |||
| 24162 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24163 | f2py_stop_clock(); | |||
| 24164 | #endif | |||
| 24165 | return capi_buildvalue; | |||
| 24166 | } | |||
| 24167 | /******************************** end of cherk ********************************/ | |||
| 24168 | ||||
| 24169 | /*********************************** zherk ***********************************/ | |||
| 24170 | static char doc_f2py_rout__fblas_zherk[] = "\ | |||
| 24171 | c = zherk(alpha,a,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``zherk``.\ | |||
| 24172 | \n\nParameters\n----------\n" | |||
| 24173 | "alpha : input complex\n" | |||
| 24174 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 24175 | "\nOther Parameters\n----------------\n" | |||
| 24176 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 24177 | "c : input rank-2 array('D') with bounds (n,n)\n" | |||
| 24178 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 24179 | "trans : input int, optional\n Default: 0\n" | |||
| 24180 | "lower : input int, optional\n Default: 0\n" | |||
| 24181 | "\nReturns\n-------\n" | |||
| 24182 | "c : rank-2 array('D') with bounds (n,n)"; | |||
| 24183 | /* extern void F_FUNC(zherk,ZHERK)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*, complex_double*,F_INT* ); */ | |||
| 24184 | static PyObject *f2py_rout__fblas_zherk(const PyObject *capi_self, | |||
| 24185 | PyObject *capi_args, | |||
| 24186 | PyObject *capi_keywds, | |||
| 24187 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*, complex_double*,F_INTint* )) { | |||
| 24188 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 24189 | volatile int f2py_success = 1; | |||
| 24190 | /*decl*/ | |||
| 24191 | ||||
| 24192 | int n = 0; | |||
| 24193 | int k = 0; | |||
| 24194 | complex_double alpha; | |||
| 24195 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 24196 | complex_double *a = NULL((void*)0); | |||
| 24197 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 24198 | const int a_Rank = 2; | |||
| 24199 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 24200 | int capi_a_intent = 0; | |||
| 24201 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 24202 | complex_double beta; | |||
| 24203 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 24204 | complex_double *c = NULL((void*)0); | |||
| 24205 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 24206 | const int c_Rank = 2; | |||
| 24207 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 24208 | int capi_c_intent = 0; | |||
| 24209 | int capi_overwrite_c = 0; | |||
| 24210 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 24211 | int trans = 0; | |||
| 24212 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 24213 | int lower = 0; | |||
| 24214 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 24215 | int lda = 0; | |||
| 24216 | int ka = 0; | |||
| 24217 | static char *capi_kwlist[] = {"alpha","a","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 24218 | ||||
| 24219 | /*routdebugenter*/ | |||
| 24220 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24221 | f2py_start_clock(); | |||
| 24222 | #endif | |||
| 24223 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 24224 | "OO|OOOOi:_fblas.zherk",\ | |||
| 24225 | capi_kwlist,&alpha_capi,&a_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 24226 | return NULL((void*)0); | |||
| 24227 | /*frompyobj*/ | |||
| 24228 | /* Processing variable lower */ | |||
| 24229 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 24230 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zherk() 4th keyword (lower) can't be converted to int"); | |||
| 24231 | if (f2py_success) { | |||
| 24232 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","zherk:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zherk:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 24233 | /* Processing variable trans */ | |||
| 24234 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 24235 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.zherk() 3rd keyword (trans) can't be converted to int"); | |||
| 24236 | if (f2py_success) { | |||
| 24237 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","zherk:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zherk:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 24238 | /* Processing variable alpha */ | |||
| 24239 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zherk() 1st argument (alpha) can't be converted to complex_double"); | |||
| 24240 | if (f2py_success) { | |||
| 24241 | /* Processing variable beta */ | |||
| 24242 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 24243 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zherk() 1st keyword (beta) can't be converted to complex_double"); | |||
| 24244 | if (f2py_success) { | |||
| 24245 | /* Processing variable a */ | |||
| 24246 | ; | |||
| 24247 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 24248 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 24249 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 24250 | if (!PyErr_Occurred()) | |||
| 24251 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zherk to C/Fortran array" ); | |||
| 24252 | } else { | |||
| 24253 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 24254 | ||||
| 24255 | /* Processing variable lda */ | |||
| 24256 | lda = shape(a,0)a_Dims[0]; | |||
| 24257 | /* Processing variable ka */ | |||
| 24258 | ka = shape(a,1)a_Dims[1]; | |||
| 24259 | /* Processing variable n */ | |||
| 24260 | n = (trans ? ka : lda); | |||
| 24261 | /* Processing variable k */ | |||
| 24262 | k = (trans ? lda : ka); | |||
| 24263 | /* Processing variable c */ | |||
| 24264 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 24265 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 24266 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 24267 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 24268 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 24269 | if (!PyErr_Occurred()) | |||
| 24270 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zherk to C/Fortran array" ); | |||
| 24271 | } else { | |||
| 24272 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 24273 | ||||
| 24274 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 24275 | /*end of frompyobj*/ | |||
| 24276 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24277 | f2py_start_call_clock(); | |||
| 24278 | #endif | |||
| 24279 | /*callfortranroutine*/ | |||
| 24280 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,&beta,c,&n) ; | |||
| 24281 | /*(*f2py_func)(&n,&k,&alpha,a,&beta,c,&trans,&lower,&lda,&ka);*/ | |||
| 24282 | if (PyErr_Occurred()) | |||
| 24283 | f2py_success = 0; | |||
| 24284 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24285 | f2py_stop_call_clock(); | |||
| 24286 | #endif | |||
| 24287 | /*end of callfortranroutine*/ | |||
| 24288 | if (f2py_success) { | |||
| 24289 | /*pyobjfrom*/ | |||
| 24290 | /*end of pyobjfrom*/ | |||
| 24291 | CFUNCSMESS("Building return value.\n"); | |||
| 24292 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 24293 | /*closepyobjfrom*/ | |||
| 24294 | /*end of closepyobjfrom*/ | |||
| 24295 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 24296 | /*cleanupfrompyobj*/ | |||
| 24297 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 24298 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 24299 | /* End of cleaning variable c */ | |||
| 24300 | /* End of cleaning variable k */ | |||
| 24301 | /* End of cleaning variable n */ | |||
| 24302 | /* End of cleaning variable ka */ | |||
| 24303 | /* End of cleaning variable lda */ | |||
| 24304 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 24305 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 24306 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 24307 | /* End of cleaning variable a */ | |||
| 24308 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 24309 | /* End of cleaning variable beta */ | |||
| 24310 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 24311 | /* End of cleaning variable alpha */ | |||
| 24312 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 24313 | } /*if (f2py_success) of trans*/ | |||
| 24314 | /* End of cleaning variable trans */ | |||
| 24315 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 24316 | } /*if (f2py_success) of lower*/ | |||
| 24317 | /* End of cleaning variable lower */ | |||
| 24318 | /*end of cleanupfrompyobj*/ | |||
| 24319 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 24320 | /*routdebugfailure*/ | |||
| 24321 | } else { | |||
| 24322 | /*routdebugleave*/ | |||
| 24323 | } | |||
| 24324 | CFUNCSMESS("Freeing memory.\n"); | |||
| 24325 | /*freemem*/ | |||
| 24326 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24327 | f2py_stop_clock(); | |||
| 24328 | #endif | |||
| 24329 | return capi_buildvalue; | |||
| 24330 | } | |||
| 24331 | /******************************** end of zherk ********************************/ | |||
| 24332 | ||||
| 24333 | /*********************************** ssyr2k ***********************************/ | |||
| 24334 | static char doc_f2py_rout__fblas_ssyr2k[] = "\ | |||
| 24335 | c = ssyr2k(alpha,a,b,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``ssyr2k``.\ | |||
| 24336 | \n\nParameters\n----------\n" | |||
| 24337 | "alpha : input float\n" | |||
| 24338 | "a : input rank-2 array('f') with bounds (lda,ka)\n" | |||
| 24339 | "b : input rank-2 array('f') with bounds (ldb,kb)\n" | |||
| 24340 | "\nOther Parameters\n----------------\n" | |||
| 24341 | "beta : input float, optional\n Default: 0.0\n" | |||
| 24342 | "c : input rank-2 array('f') with bounds (n,n)\n" | |||
| 24343 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 24344 | "trans : input int, optional\n Default: 0\n" | |||
| 24345 | "lower : input int, optional\n Default: 0\n" | |||
| 24346 | "\nReturns\n-------\n" | |||
| 24347 | "c : rank-2 array('f') with bounds (n,n)"; | |||
| 24348 | /* extern void F_FUNC(ssyr2k,SSYR2K)(char*,char*,F_INT*,F_INT*,float*,float*,F_INT*,float*,F_INT*, float*, float*,F_INT* ); */ | |||
| 24349 | static PyObject *f2py_rout__fblas_ssyr2k(const PyObject *capi_self, | |||
| 24350 | PyObject *capi_args, | |||
| 24351 | PyObject *capi_keywds, | |||
| 24352 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,float*,float*,F_INTint*,float*,F_INTint*, float*, float*,F_INTint* )) { | |||
| 24353 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 24354 | volatile int f2py_success = 1; | |||
| 24355 | /*decl*/ | |||
| 24356 | ||||
| 24357 | int n = 0; | |||
| 24358 | int k = 0; | |||
| 24359 | float alpha = 0; | |||
| 24360 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 24361 | float *a = NULL((void*)0); | |||
| 24362 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 24363 | const int a_Rank = 2; | |||
| 24364 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 24365 | int capi_a_intent = 0; | |||
| 24366 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 24367 | float *b = NULL((void*)0); | |||
| 24368 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 24369 | const int b_Rank = 2; | |||
| 24370 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 24371 | int capi_b_intent = 0; | |||
| 24372 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 24373 | float beta = 0; | |||
| 24374 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 24375 | float *c = NULL((void*)0); | |||
| 24376 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 24377 | const int c_Rank = 2; | |||
| 24378 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 24379 | int capi_c_intent = 0; | |||
| 24380 | int capi_overwrite_c = 0; | |||
| 24381 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 24382 | int trans = 0; | |||
| 24383 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 24384 | int lower = 0; | |||
| 24385 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 24386 | int lda = 0; | |||
| 24387 | int ka = 0; | |||
| 24388 | int ldb = 0; | |||
| 24389 | int kb = 0; | |||
| 24390 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 24391 | ||||
| 24392 | /*routdebugenter*/ | |||
| 24393 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24394 | f2py_start_clock(); | |||
| 24395 | #endif | |||
| 24396 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 24397 | "OOO|OOOOi:_fblas.ssyr2k",\ | |||
| 24398 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 24399 | return NULL((void*)0); | |||
| 24400 | /*frompyobj*/ | |||
| 24401 | /* Processing variable lower */ | |||
| 24402 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 24403 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ssyr2k() 4th keyword (lower) can't be converted to int"); | |||
| 24404 | if (f2py_success) { | |||
| 24405 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","ssyr2k:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr2k:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 24406 | /* Processing variable trans */ | |||
| 24407 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 24408 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.ssyr2k() 3rd keyword (trans) can't be converted to int"); | |||
| 24409 | if (f2py_success) { | |||
| 24410 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","ssyr2k:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ssyr2k:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 24411 | /* Processing variable alpha */ | |||
| 24412 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.ssyr2k() 1st argument (alpha) can't be converted to float"); | |||
| 24413 | if (f2py_success) { | |||
| 24414 | /* Processing variable beta */ | |||
| 24415 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 24416 | f2py_success = float_from_pyobj(&beta,beta_capi,"_fblas.ssyr2k() 1st keyword (beta) can't be converted to float"); | |||
| 24417 | if (f2py_success) { | |||
| 24418 | /* Processing variable a */ | |||
| 24419 | ; | |||
| 24420 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 24421 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 24422 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 24423 | if (!PyErr_Occurred()) | |||
| 24424 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ssyr2k to C/Fortran array" ); | |||
| 24425 | } else { | |||
| 24426 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 24427 | ||||
| 24428 | /* Processing variable b */ | |||
| 24429 | ; | |||
| 24430 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 24431 | capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 24432 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 24433 | if (!PyErr_Occurred()) | |||
| 24434 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.ssyr2k to C/Fortran array" ); | |||
| 24435 | } else { | |||
| 24436 | b = (float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 24437 | ||||
| 24438 | /* Processing variable lda */ | |||
| 24439 | lda = shape(a,0)a_Dims[0]; | |||
| 24440 | /* Processing variable ka */ | |||
| 24441 | ka = shape(a,1)a_Dims[1]; | |||
| 24442 | /* Processing variable ldb */ | |||
| 24443 | ldb = shape(b,0)b_Dims[0]; | |||
| 24444 | /* Processing variable kb */ | |||
| 24445 | kb = shape(b,1)b_Dims[1]; | |||
| 24446 | /* Processing variable n */ | |||
| 24447 | n = (trans ? ka : lda); | |||
| 24448 | /* Processing variable k */ | |||
| 24449 | k = (trans ? lda : ka); | |||
| 24450 | CHECKSCALAR(trans ? lda==ldb: ka==kb,"trans ? lda==ldb: ka==kb","hidden k","ssyr2k:k=%d",k)if (!(trans ? lda==ldb: ka==kb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ssyr2k:k=%d", "(""trans ? lda==ldb: ka==kb"") failed for " "hidden k", k); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 24451 | /* Processing variable c */ | |||
| 24452 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 24453 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 24454 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 24455 | capi_c_tmp = array_from_pyobj(NPY_FLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 24456 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 24457 | if (!PyErr_Occurred()) | |||
| 24458 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.ssyr2k to C/Fortran array" ); | |||
| 24459 | } else { | |||
| 24460 | c = (float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 24461 | ||||
| 24462 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 24463 | /*end of frompyobj*/ | |||
| 24464 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24465 | f2py_start_call_clock(); | |||
| 24466 | #endif | |||
| 24467 | /*callfortranroutine*/ | |||
| 24468 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&n) ; | |||
| 24469 | /*(*f2py_func)(&n,&k,&alpha,a,b,&beta,c,&trans,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 24470 | if (PyErr_Occurred()) | |||
| 24471 | f2py_success = 0; | |||
| 24472 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24473 | f2py_stop_call_clock(); | |||
| 24474 | #endif | |||
| 24475 | /*end of callfortranroutine*/ | |||
| 24476 | if (f2py_success) { | |||
| 24477 | /*pyobjfrom*/ | |||
| 24478 | /*end of pyobjfrom*/ | |||
| 24479 | CFUNCSMESS("Building return value.\n"); | |||
| 24480 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 24481 | /*closepyobjfrom*/ | |||
| 24482 | /*end of closepyobjfrom*/ | |||
| 24483 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 24484 | /*cleanupfrompyobj*/ | |||
| 24485 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 24486 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 24487 | /* End of cleaning variable c */ | |||
| 24488 | } /*CHECKSCALAR(trans ? lda==ldb: ka==kb)*/ | |||
| 24489 | /* End of cleaning variable k */ | |||
| 24490 | /* End of cleaning variable n */ | |||
| 24491 | /* End of cleaning variable kb */ | |||
| 24492 | /* End of cleaning variable ldb */ | |||
| 24493 | /* End of cleaning variable ka */ | |||
| 24494 | /* End of cleaning variable lda */ | |||
| 24495 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 24496 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 24497 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 24498 | /* End of cleaning variable b */ | |||
| 24499 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 24500 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 24501 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 24502 | /* End of cleaning variable a */ | |||
| 24503 | } /*if (f2py_success) of beta*/ | |||
| 24504 | /* End of cleaning variable beta */ | |||
| 24505 | } /*if (f2py_success) of alpha*/ | |||
| 24506 | /* End of cleaning variable alpha */ | |||
| 24507 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 24508 | } /*if (f2py_success) of trans*/ | |||
| 24509 | /* End of cleaning variable trans */ | |||
| 24510 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 24511 | } /*if (f2py_success) of lower*/ | |||
| 24512 | /* End of cleaning variable lower */ | |||
| 24513 | /*end of cleanupfrompyobj*/ | |||
| 24514 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 24515 | /*routdebugfailure*/ | |||
| 24516 | } else { | |||
| 24517 | /*routdebugleave*/ | |||
| 24518 | } | |||
| 24519 | CFUNCSMESS("Freeing memory.\n"); | |||
| 24520 | /*freemem*/ | |||
| 24521 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24522 | f2py_stop_clock(); | |||
| 24523 | #endif | |||
| 24524 | return capi_buildvalue; | |||
| 24525 | } | |||
| 24526 | /******************************* end of ssyr2k *******************************/ | |||
| 24527 | ||||
| 24528 | /*********************************** dsyr2k ***********************************/ | |||
| 24529 | static char doc_f2py_rout__fblas_dsyr2k[] = "\ | |||
| 24530 | c = dsyr2k(alpha,a,b,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``dsyr2k``.\ | |||
| 24531 | \n\nParameters\n----------\n" | |||
| 24532 | "alpha : input float\n" | |||
| 24533 | "a : input rank-2 array('d') with bounds (lda,ka)\n" | |||
| 24534 | "b : input rank-2 array('d') with bounds (ldb,kb)\n" | |||
| 24535 | "\nOther Parameters\n----------------\n" | |||
| 24536 | "beta : input float, optional\n Default: 0.0\n" | |||
| 24537 | "c : input rank-2 array('d') with bounds (n,n)\n" | |||
| 24538 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 24539 | "trans : input int, optional\n Default: 0\n" | |||
| 24540 | "lower : input int, optional\n Default: 0\n" | |||
| 24541 | "\nReturns\n-------\n" | |||
| 24542 | "c : rank-2 array('d') with bounds (n,n)"; | |||
| 24543 | /* extern void F_FUNC(dsyr2k,DSYR2K)(char*,char*,F_INT*,F_INT*,double*,double*,F_INT*,double*,F_INT*, double*, double*,F_INT* ); */ | |||
| 24544 | static PyObject *f2py_rout__fblas_dsyr2k(const PyObject *capi_self, | |||
| 24545 | PyObject *capi_args, | |||
| 24546 | PyObject *capi_keywds, | |||
| 24547 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,double*,double*,F_INTint*,double*,F_INTint*, double*, double*,F_INTint* )) { | |||
| 24548 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 24549 | volatile int f2py_success = 1; | |||
| 24550 | /*decl*/ | |||
| 24551 | ||||
| 24552 | int n = 0; | |||
| 24553 | int k = 0; | |||
| 24554 | double alpha = 0; | |||
| 24555 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 24556 | double *a = NULL((void*)0); | |||
| 24557 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 24558 | const int a_Rank = 2; | |||
| 24559 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 24560 | int capi_a_intent = 0; | |||
| 24561 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 24562 | double *b = NULL((void*)0); | |||
| 24563 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 24564 | const int b_Rank = 2; | |||
| 24565 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 24566 | int capi_b_intent = 0; | |||
| 24567 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 24568 | double beta = 0; | |||
| 24569 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 24570 | double *c = NULL((void*)0); | |||
| 24571 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 24572 | const int c_Rank = 2; | |||
| 24573 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 24574 | int capi_c_intent = 0; | |||
| 24575 | int capi_overwrite_c = 0; | |||
| 24576 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 24577 | int trans = 0; | |||
| 24578 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 24579 | int lower = 0; | |||
| 24580 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 24581 | int lda = 0; | |||
| 24582 | int ka = 0; | |||
| 24583 | int ldb = 0; | |||
| 24584 | int kb = 0; | |||
| 24585 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 24586 | ||||
| 24587 | /*routdebugenter*/ | |||
| 24588 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24589 | f2py_start_clock(); | |||
| 24590 | #endif | |||
| 24591 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 24592 | "OOO|OOOOi:_fblas.dsyr2k",\ | |||
| 24593 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 24594 | return NULL((void*)0); | |||
| 24595 | /*frompyobj*/ | |||
| 24596 | /* Processing variable lower */ | |||
| 24597 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 24598 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dsyr2k() 4th keyword (lower) can't be converted to int"); | |||
| 24599 | if (f2py_success) { | |||
| 24600 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","dsyr2k:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr2k:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 24601 | /* Processing variable trans */ | |||
| 24602 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 24603 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.dsyr2k() 3rd keyword (trans) can't be converted to int"); | |||
| 24604 | if (f2py_success) { | |||
| 24605 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","dsyr2k:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dsyr2k:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 24606 | /* Processing variable alpha */ | |||
| 24607 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dsyr2k() 1st argument (alpha) can't be converted to double"); | |||
| 24608 | if (f2py_success) { | |||
| 24609 | /* Processing variable beta */ | |||
| 24610 | if (beta_capi == Py_None(&_Py_NoneStruct)) beta = 0.0; else | |||
| 24611 | f2py_success = double_from_pyobj(&beta,beta_capi,"_fblas.dsyr2k() 1st keyword (beta) can't be converted to double"); | |||
| 24612 | if (f2py_success) { | |||
| 24613 | /* Processing variable a */ | |||
| 24614 | ; | |||
| 24615 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 24616 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 24617 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 24618 | if (!PyErr_Occurred()) | |||
| 24619 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dsyr2k to C/Fortran array" ); | |||
| 24620 | } else { | |||
| 24621 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 24622 | ||||
| 24623 | /* Processing variable b */ | |||
| 24624 | ; | |||
| 24625 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 24626 | capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 24627 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 24628 | if (!PyErr_Occurred()) | |||
| 24629 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.dsyr2k to C/Fortran array" ); | |||
| 24630 | } else { | |||
| 24631 | b = (double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 24632 | ||||
| 24633 | /* Processing variable lda */ | |||
| 24634 | lda = shape(a,0)a_Dims[0]; | |||
| 24635 | /* Processing variable ka */ | |||
| 24636 | ka = shape(a,1)a_Dims[1]; | |||
| 24637 | /* Processing variable ldb */ | |||
| 24638 | ldb = shape(b,0)b_Dims[0]; | |||
| 24639 | /* Processing variable kb */ | |||
| 24640 | kb = shape(b,1)b_Dims[1]; | |||
| 24641 | /* Processing variable n */ | |||
| 24642 | n = (trans ? ka : lda); | |||
| 24643 | /* Processing variable k */ | |||
| 24644 | k = (trans ? lda : ka); | |||
| 24645 | CHECKSCALAR(trans ? lda==ldb: ka==kb,"trans ? lda==ldb: ka==kb","hidden k","dsyr2k:k=%d",k)if (!(trans ? lda==ldb: ka==kb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dsyr2k:k=%d", "(""trans ? lda==ldb: ka==kb"") failed for " "hidden k", k); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 24646 | /* Processing variable c */ | |||
| 24647 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 24648 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 24649 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 24650 | capi_c_tmp = array_from_pyobj(NPY_DOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 24651 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 24652 | if (!PyErr_Occurred()) | |||
| 24653 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.dsyr2k to C/Fortran array" ); | |||
| 24654 | } else { | |||
| 24655 | c = (double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 24656 | ||||
| 24657 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 24658 | /*end of frompyobj*/ | |||
| 24659 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24660 | f2py_start_call_clock(); | |||
| 24661 | #endif | |||
| 24662 | /*callfortranroutine*/ | |||
| 24663 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&n) ; | |||
| 24664 | /*(*f2py_func)(&n,&k,&alpha,a,b,&beta,c,&trans,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 24665 | if (PyErr_Occurred()) | |||
| 24666 | f2py_success = 0; | |||
| 24667 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24668 | f2py_stop_call_clock(); | |||
| 24669 | #endif | |||
| 24670 | /*end of callfortranroutine*/ | |||
| 24671 | if (f2py_success) { | |||
| 24672 | /*pyobjfrom*/ | |||
| 24673 | /*end of pyobjfrom*/ | |||
| 24674 | CFUNCSMESS("Building return value.\n"); | |||
| 24675 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 24676 | /*closepyobjfrom*/ | |||
| 24677 | /*end of closepyobjfrom*/ | |||
| 24678 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 24679 | /*cleanupfrompyobj*/ | |||
| 24680 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 24681 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 24682 | /* End of cleaning variable c */ | |||
| 24683 | } /*CHECKSCALAR(trans ? lda==ldb: ka==kb)*/ | |||
| 24684 | /* End of cleaning variable k */ | |||
| 24685 | /* End of cleaning variable n */ | |||
| 24686 | /* End of cleaning variable kb */ | |||
| 24687 | /* End of cleaning variable ldb */ | |||
| 24688 | /* End of cleaning variable ka */ | |||
| 24689 | /* End of cleaning variable lda */ | |||
| 24690 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 24691 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 24692 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 24693 | /* End of cleaning variable b */ | |||
| 24694 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 24695 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 24696 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 24697 | /* End of cleaning variable a */ | |||
| 24698 | } /*if (f2py_success) of beta*/ | |||
| 24699 | /* End of cleaning variable beta */ | |||
| 24700 | } /*if (f2py_success) of alpha*/ | |||
| 24701 | /* End of cleaning variable alpha */ | |||
| 24702 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 24703 | } /*if (f2py_success) of trans*/ | |||
| 24704 | /* End of cleaning variable trans */ | |||
| 24705 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 24706 | } /*if (f2py_success) of lower*/ | |||
| 24707 | /* End of cleaning variable lower */ | |||
| 24708 | /*end of cleanupfrompyobj*/ | |||
| 24709 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 24710 | /*routdebugfailure*/ | |||
| 24711 | } else { | |||
| 24712 | /*routdebugleave*/ | |||
| 24713 | } | |||
| 24714 | CFUNCSMESS("Freeing memory.\n"); | |||
| 24715 | /*freemem*/ | |||
| 24716 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24717 | f2py_stop_clock(); | |||
| 24718 | #endif | |||
| 24719 | return capi_buildvalue; | |||
| 24720 | } | |||
| 24721 | /******************************* end of dsyr2k *******************************/ | |||
| 24722 | ||||
| 24723 | /*********************************** csyr2k ***********************************/ | |||
| 24724 | static char doc_f2py_rout__fblas_csyr2k[] = "\ | |||
| 24725 | c = csyr2k(alpha,a,b,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``csyr2k``.\ | |||
| 24726 | \n\nParameters\n----------\n" | |||
| 24727 | "alpha : input complex\n" | |||
| 24728 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 24729 | "b : input rank-2 array('F') with bounds (ldb,kb)\n" | |||
| 24730 | "\nOther Parameters\n----------------\n" | |||
| 24731 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 24732 | "c : input rank-2 array('F') with bounds (n,n)\n" | |||
| 24733 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 24734 | "trans : input int, optional\n Default: 0\n" | |||
| 24735 | "lower : input int, optional\n Default: 0\n" | |||
| 24736 | "\nReturns\n-------\n" | |||
| 24737 | "c : rank-2 array('F') with bounds (n,n)"; | |||
| 24738 | /* extern void F_FUNC(csyr2k,CSYR2K)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*, complex_float*, complex_float*,F_INT* ); */ | |||
| 24739 | static PyObject *f2py_rout__fblas_csyr2k(const PyObject *capi_self, | |||
| 24740 | PyObject *capi_args, | |||
| 24741 | PyObject *capi_keywds, | |||
| 24742 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*, complex_float*, complex_float*,F_INTint* )) { | |||
| 24743 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 24744 | volatile int f2py_success = 1; | |||
| 24745 | /*decl*/ | |||
| 24746 | ||||
| 24747 | int n = 0; | |||
| 24748 | int k = 0; | |||
| 24749 | complex_float alpha; | |||
| 24750 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 24751 | complex_float *a = NULL((void*)0); | |||
| 24752 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 24753 | const int a_Rank = 2; | |||
| 24754 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 24755 | int capi_a_intent = 0; | |||
| 24756 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 24757 | complex_float *b = NULL((void*)0); | |||
| 24758 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 24759 | const int b_Rank = 2; | |||
| 24760 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 24761 | int capi_b_intent = 0; | |||
| 24762 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 24763 | complex_float beta; | |||
| 24764 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 24765 | complex_float *c = NULL((void*)0); | |||
| 24766 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 24767 | const int c_Rank = 2; | |||
| 24768 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 24769 | int capi_c_intent = 0; | |||
| 24770 | int capi_overwrite_c = 0; | |||
| 24771 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 24772 | int trans = 0; | |||
| 24773 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 24774 | int lower = 0; | |||
| 24775 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 24776 | int lda = 0; | |||
| 24777 | int ka = 0; | |||
| 24778 | int ldb = 0; | |||
| 24779 | int kb = 0; | |||
| 24780 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 24781 | ||||
| 24782 | /*routdebugenter*/ | |||
| 24783 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24784 | f2py_start_clock(); | |||
| 24785 | #endif | |||
| 24786 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 24787 | "OOO|OOOOi:_fblas.csyr2k",\ | |||
| 24788 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 24789 | return NULL((void*)0); | |||
| 24790 | /*frompyobj*/ | |||
| 24791 | /* Processing variable lower */ | |||
| 24792 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 24793 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.csyr2k() 4th keyword (lower) can't be converted to int"); | |||
| 24794 | if (f2py_success) { | |||
| 24795 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","csyr2k:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csyr2k:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 24796 | /* Processing variable trans */ | |||
| 24797 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 24798 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.csyr2k() 3rd keyword (trans) can't be converted to int"); | |||
| 24799 | if (f2py_success) { | |||
| 24800 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","csyr2k:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""csyr2k:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 24801 | /* Processing variable alpha */ | |||
| 24802 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.csyr2k() 1st argument (alpha) can't be converted to complex_float"); | |||
| 24803 | if (f2py_success) { | |||
| 24804 | /* Processing variable beta */ | |||
| 24805 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 24806 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.csyr2k() 1st keyword (beta) can't be converted to complex_float"); | |||
| 24807 | if (f2py_success) { | |||
| 24808 | /* Processing variable a */ | |||
| 24809 | ; | |||
| 24810 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 24811 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 24812 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 24813 | if (!PyErr_Occurred()) | |||
| 24814 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.csyr2k to C/Fortran array" ); | |||
| 24815 | } else { | |||
| 24816 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 24817 | ||||
| 24818 | /* Processing variable b */ | |||
| 24819 | ; | |||
| 24820 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 24821 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 24822 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 24823 | if (!PyErr_Occurred()) | |||
| 24824 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.csyr2k to C/Fortran array" ); | |||
| 24825 | } else { | |||
| 24826 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 24827 | ||||
| 24828 | /* Processing variable lda */ | |||
| 24829 | lda = shape(a,0)a_Dims[0]; | |||
| 24830 | /* Processing variable ka */ | |||
| 24831 | ka = shape(a,1)a_Dims[1]; | |||
| 24832 | /* Processing variable ldb */ | |||
| 24833 | ldb = shape(b,0)b_Dims[0]; | |||
| 24834 | /* Processing variable kb */ | |||
| 24835 | kb = shape(b,1)b_Dims[1]; | |||
| 24836 | /* Processing variable n */ | |||
| 24837 | n = (trans ? ka : lda); | |||
| 24838 | /* Processing variable k */ | |||
| 24839 | k = (trans ? lda : ka); | |||
| 24840 | CHECKSCALAR(trans ? lda==ldb: ka==kb,"trans ? lda==ldb: ka==kb","hidden k","csyr2k:k=%d",k)if (!(trans ? lda==ldb: ka==kb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""csyr2k:k=%d", "(""trans ? lda==ldb: ka==kb"") failed for " "hidden k", k); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 24841 | /* Processing variable c */ | |||
| 24842 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 24843 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 24844 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 24845 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 24846 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 24847 | if (!PyErr_Occurred()) | |||
| 24848 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.csyr2k to C/Fortran array" ); | |||
| 24849 | } else { | |||
| 24850 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 24851 | ||||
| 24852 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 24853 | /*end of frompyobj*/ | |||
| 24854 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24855 | f2py_start_call_clock(); | |||
| 24856 | #endif | |||
| 24857 | /*callfortranroutine*/ | |||
| 24858 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&n) ; | |||
| 24859 | /*(*f2py_func)(&n,&k,&alpha,a,b,&beta,c,&trans,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 24860 | if (PyErr_Occurred()) | |||
| 24861 | f2py_success = 0; | |||
| 24862 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24863 | f2py_stop_call_clock(); | |||
| 24864 | #endif | |||
| 24865 | /*end of callfortranroutine*/ | |||
| 24866 | if (f2py_success) { | |||
| 24867 | /*pyobjfrom*/ | |||
| 24868 | /*end of pyobjfrom*/ | |||
| 24869 | CFUNCSMESS("Building return value.\n"); | |||
| 24870 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 24871 | /*closepyobjfrom*/ | |||
| 24872 | /*end of closepyobjfrom*/ | |||
| 24873 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 24874 | /*cleanupfrompyobj*/ | |||
| 24875 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 24876 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 24877 | /* End of cleaning variable c */ | |||
| 24878 | } /*CHECKSCALAR(trans ? lda==ldb: ka==kb)*/ | |||
| 24879 | /* End of cleaning variable k */ | |||
| 24880 | /* End of cleaning variable n */ | |||
| 24881 | /* End of cleaning variable kb */ | |||
| 24882 | /* End of cleaning variable ldb */ | |||
| 24883 | /* End of cleaning variable ka */ | |||
| 24884 | /* End of cleaning variable lda */ | |||
| 24885 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 24886 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 24887 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 24888 | /* End of cleaning variable b */ | |||
| 24889 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 24890 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 24891 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 24892 | /* End of cleaning variable a */ | |||
| 24893 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 24894 | /* End of cleaning variable beta */ | |||
| 24895 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 24896 | /* End of cleaning variable alpha */ | |||
| 24897 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 24898 | } /*if (f2py_success) of trans*/ | |||
| 24899 | /* End of cleaning variable trans */ | |||
| 24900 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 24901 | } /*if (f2py_success) of lower*/ | |||
| 24902 | /* End of cleaning variable lower */ | |||
| 24903 | /*end of cleanupfrompyobj*/ | |||
| 24904 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 24905 | /*routdebugfailure*/ | |||
| 24906 | } else { | |||
| 24907 | /*routdebugleave*/ | |||
| 24908 | } | |||
| 24909 | CFUNCSMESS("Freeing memory.\n"); | |||
| 24910 | /*freemem*/ | |||
| 24911 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24912 | f2py_stop_clock(); | |||
| 24913 | #endif | |||
| 24914 | return capi_buildvalue; | |||
| 24915 | } | |||
| 24916 | /******************************* end of csyr2k *******************************/ | |||
| 24917 | ||||
| 24918 | /*********************************** zsyr2k ***********************************/ | |||
| 24919 | static char doc_f2py_rout__fblas_zsyr2k[] = "\ | |||
| 24920 | c = zsyr2k(alpha,a,b,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``zsyr2k``.\ | |||
| 24921 | \n\nParameters\n----------\n" | |||
| 24922 | "alpha : input complex\n" | |||
| 24923 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 24924 | "b : input rank-2 array('D') with bounds (ldb,kb)\n" | |||
| 24925 | "\nOther Parameters\n----------------\n" | |||
| 24926 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 24927 | "c : input rank-2 array('D') with bounds (n,n)\n" | |||
| 24928 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 24929 | "trans : input int, optional\n Default: 0\n" | |||
| 24930 | "lower : input int, optional\n Default: 0\n" | |||
| 24931 | "\nReturns\n-------\n" | |||
| 24932 | "c : rank-2 array('D') with bounds (n,n)"; | |||
| 24933 | /* extern void F_FUNC(zsyr2k,ZSYR2K)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*, complex_double*, complex_double*,F_INT* ); */ | |||
| 24934 | static PyObject *f2py_rout__fblas_zsyr2k(const PyObject *capi_self, | |||
| 24935 | PyObject *capi_args, | |||
| 24936 | PyObject *capi_keywds, | |||
| 24937 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*, complex_double*, complex_double*,F_INTint* )) { | |||
| 24938 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 24939 | volatile int f2py_success = 1; | |||
| 24940 | /*decl*/ | |||
| 24941 | ||||
| 24942 | int n = 0; | |||
| 24943 | int k = 0; | |||
| 24944 | complex_double alpha; | |||
| 24945 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 24946 | complex_double *a = NULL((void*)0); | |||
| 24947 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 24948 | const int a_Rank = 2; | |||
| 24949 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 24950 | int capi_a_intent = 0; | |||
| 24951 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 24952 | complex_double *b = NULL((void*)0); | |||
| 24953 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 24954 | const int b_Rank = 2; | |||
| 24955 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 24956 | int capi_b_intent = 0; | |||
| 24957 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 24958 | complex_double beta; | |||
| 24959 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 24960 | complex_double *c = NULL((void*)0); | |||
| 24961 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 24962 | const int c_Rank = 2; | |||
| 24963 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 24964 | int capi_c_intent = 0; | |||
| 24965 | int capi_overwrite_c = 0; | |||
| 24966 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 24967 | int trans = 0; | |||
| 24968 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 24969 | int lower = 0; | |||
| 24970 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 24971 | int lda = 0; | |||
| 24972 | int ka = 0; | |||
| 24973 | int ldb = 0; | |||
| 24974 | int kb = 0; | |||
| 24975 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 24976 | ||||
| 24977 | /*routdebugenter*/ | |||
| 24978 | #ifdef F2PY_REPORT_ATEXIT | |||
| 24979 | f2py_start_clock(); | |||
| 24980 | #endif | |||
| 24981 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 24982 | "OOO|OOOOi:_fblas.zsyr2k",\ | |||
| 24983 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 24984 | return NULL((void*)0); | |||
| 24985 | /*frompyobj*/ | |||
| 24986 | /* Processing variable lower */ | |||
| 24987 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 24988 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zsyr2k() 4th keyword (lower) can't be converted to int"); | |||
| 24989 | if (f2py_success) { | |||
| 24990 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","zsyr2k:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsyr2k:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 24991 | /* Processing variable trans */ | |||
| 24992 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 24993 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.zsyr2k() 3rd keyword (trans) can't be converted to int"); | |||
| 24994 | if (f2py_success) { | |||
| 24995 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","zsyr2k:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zsyr2k:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 24996 | /* Processing variable alpha */ | |||
| 24997 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zsyr2k() 1st argument (alpha) can't be converted to complex_double"); | |||
| 24998 | if (f2py_success) { | |||
| 24999 | /* Processing variable beta */ | |||
| 25000 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 25001 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zsyr2k() 1st keyword (beta) can't be converted to complex_double"); | |||
| 25002 | if (f2py_success) { | |||
| 25003 | /* Processing variable a */ | |||
| 25004 | ; | |||
| 25005 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 25006 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 25007 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 25008 | if (!PyErr_Occurred()) | |||
| 25009 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zsyr2k to C/Fortran array" ); | |||
| 25010 | } else { | |||
| 25011 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 25012 | ||||
| 25013 | /* Processing variable b */ | |||
| 25014 | ; | |||
| 25015 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 25016 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 25017 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 25018 | if (!PyErr_Occurred()) | |||
| 25019 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.zsyr2k to C/Fortran array" ); | |||
| 25020 | } else { | |||
| 25021 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 25022 | ||||
| 25023 | /* Processing variable lda */ | |||
| 25024 | lda = shape(a,0)a_Dims[0]; | |||
| 25025 | /* Processing variable ka */ | |||
| 25026 | ka = shape(a,1)a_Dims[1]; | |||
| 25027 | /* Processing variable ldb */ | |||
| 25028 | ldb = shape(b,0)b_Dims[0]; | |||
| 25029 | /* Processing variable kb */ | |||
| 25030 | kb = shape(b,1)b_Dims[1]; | |||
| 25031 | /* Processing variable n */ | |||
| 25032 | n = (trans ? ka : lda); | |||
| 25033 | /* Processing variable k */ | |||
| 25034 | k = (trans ? lda : ka); | |||
| 25035 | CHECKSCALAR(trans ? lda==ldb: ka==kb,"trans ? lda==ldb: ka==kb","hidden k","zsyr2k:k=%d",k)if (!(trans ? lda==ldb: ka==kb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zsyr2k:k=%d", "(""trans ? lda==ldb: ka==kb"") failed for " "hidden k", k); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 25036 | /* Processing variable c */ | |||
| 25037 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 25038 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 25039 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 25040 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 25041 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 25042 | if (!PyErr_Occurred()) | |||
| 25043 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zsyr2k to C/Fortran array" ); | |||
| 25044 | } else { | |||
| 25045 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 25046 | ||||
| 25047 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 25048 | /*end of frompyobj*/ | |||
| 25049 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25050 | f2py_start_call_clock(); | |||
| 25051 | #endif | |||
| 25052 | /*callfortranroutine*/ | |||
| 25053 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&n) ; | |||
| 25054 | /*(*f2py_func)(&n,&k,&alpha,a,b,&beta,c,&trans,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 25055 | if (PyErr_Occurred()) | |||
| 25056 | f2py_success = 0; | |||
| 25057 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25058 | f2py_stop_call_clock(); | |||
| 25059 | #endif | |||
| 25060 | /*end of callfortranroutine*/ | |||
| 25061 | if (f2py_success) { | |||
| 25062 | /*pyobjfrom*/ | |||
| 25063 | /*end of pyobjfrom*/ | |||
| 25064 | CFUNCSMESS("Building return value.\n"); | |||
| 25065 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 25066 | /*closepyobjfrom*/ | |||
| 25067 | /*end of closepyobjfrom*/ | |||
| 25068 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 25069 | /*cleanupfrompyobj*/ | |||
| 25070 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 25071 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 25072 | /* End of cleaning variable c */ | |||
| 25073 | } /*CHECKSCALAR(trans ? lda==ldb: ka==kb)*/ | |||
| 25074 | /* End of cleaning variable k */ | |||
| 25075 | /* End of cleaning variable n */ | |||
| 25076 | /* End of cleaning variable kb */ | |||
| 25077 | /* End of cleaning variable ldb */ | |||
| 25078 | /* End of cleaning variable ka */ | |||
| 25079 | /* End of cleaning variable lda */ | |||
| 25080 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 25081 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 25082 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 25083 | /* End of cleaning variable b */ | |||
| 25084 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 25085 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 25086 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 25087 | /* End of cleaning variable a */ | |||
| 25088 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 25089 | /* End of cleaning variable beta */ | |||
| 25090 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 25091 | /* End of cleaning variable alpha */ | |||
| 25092 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 25093 | } /*if (f2py_success) of trans*/ | |||
| 25094 | /* End of cleaning variable trans */ | |||
| 25095 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 25096 | } /*if (f2py_success) of lower*/ | |||
| 25097 | /* End of cleaning variable lower */ | |||
| 25098 | /*end of cleanupfrompyobj*/ | |||
| 25099 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 25100 | /*routdebugfailure*/ | |||
| 25101 | } else { | |||
| 25102 | /*routdebugleave*/ | |||
| 25103 | } | |||
| 25104 | CFUNCSMESS("Freeing memory.\n"); | |||
| 25105 | /*freemem*/ | |||
| 25106 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25107 | f2py_stop_clock(); | |||
| 25108 | #endif | |||
| 25109 | return capi_buildvalue; | |||
| 25110 | } | |||
| 25111 | /******************************* end of zsyr2k *******************************/ | |||
| 25112 | ||||
| 25113 | /*********************************** cher2k ***********************************/ | |||
| 25114 | static char doc_f2py_rout__fblas_cher2k[] = "\ | |||
| 25115 | c = cher2k(alpha,a,b,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``cher2k``.\ | |||
| 25116 | \n\nParameters\n----------\n" | |||
| 25117 | "alpha : input complex\n" | |||
| 25118 | "a : input rank-2 array('F') with bounds (lda,ka)\n" | |||
| 25119 | "b : input rank-2 array('F') with bounds (ldb,kb)\n" | |||
| 25120 | "\nOther Parameters\n----------------\n" | |||
| 25121 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 25122 | "c : input rank-2 array('F') with bounds (n,n)\n" | |||
| 25123 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 25124 | "trans : input int, optional\n Default: 0\n" | |||
| 25125 | "lower : input int, optional\n Default: 0\n" | |||
| 25126 | "\nReturns\n-------\n" | |||
| 25127 | "c : rank-2 array('F') with bounds (n,n)"; | |||
| 25128 | /* extern void F_FUNC(cher2k,CHER2K)(char*,char*,F_INT*,F_INT*,complex_float*,complex_float*,F_INT*,complex_float*,F_INT*, complex_float*, complex_float*,F_INT* ); */ | |||
| 25129 | static PyObject *f2py_rout__fblas_cher2k(const PyObject *capi_self, | |||
| 25130 | PyObject *capi_args, | |||
| 25131 | PyObject *capi_keywds, | |||
| 25132 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_float*,complex_float*,F_INTint*,complex_float*,F_INTint*, complex_float*, complex_float*,F_INTint* )) { | |||
| 25133 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 25134 | volatile int f2py_success = 1; | |||
| 25135 | /*decl*/ | |||
| 25136 | ||||
| 25137 | int n = 0; | |||
| 25138 | int k = 0; | |||
| 25139 | complex_float alpha; | |||
| 25140 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 25141 | complex_float *a = NULL((void*)0); | |||
| 25142 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 25143 | const int a_Rank = 2; | |||
| 25144 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 25145 | int capi_a_intent = 0; | |||
| 25146 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 25147 | complex_float *b = NULL((void*)0); | |||
| 25148 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 25149 | const int b_Rank = 2; | |||
| 25150 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 25151 | int capi_b_intent = 0; | |||
| 25152 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 25153 | complex_float beta; | |||
| 25154 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 25155 | complex_float *c = NULL((void*)0); | |||
| 25156 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 25157 | const int c_Rank = 2; | |||
| 25158 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 25159 | int capi_c_intent = 0; | |||
| 25160 | int capi_overwrite_c = 0; | |||
| 25161 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 25162 | int trans = 0; | |||
| 25163 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 25164 | int lower = 0; | |||
| 25165 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 25166 | int lda = 0; | |||
| 25167 | int ka = 0; | |||
| 25168 | int ldb = 0; | |||
| 25169 | int kb = 0; | |||
| 25170 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 25171 | ||||
| 25172 | /*routdebugenter*/ | |||
| 25173 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25174 | f2py_start_clock(); | |||
| 25175 | #endif | |||
| 25176 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 25177 | "OOO|OOOOi:_fblas.cher2k",\ | |||
| 25178 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 25179 | return NULL((void*)0); | |||
| 25180 | /*frompyobj*/ | |||
| 25181 | /* Processing variable lower */ | |||
| 25182 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 25183 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.cher2k() 4th keyword (lower) can't be converted to int"); | |||
| 25184 | if (f2py_success) { | |||
| 25185 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","cher2k:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher2k:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25186 | /* Processing variable trans */ | |||
| 25187 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 25188 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.cher2k() 3rd keyword (trans) can't be converted to int"); | |||
| 25189 | if (f2py_success) { | |||
| 25190 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","cher2k:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""cher2k:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 25191 | /* Processing variable alpha */ | |||
| 25192 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.cher2k() 1st argument (alpha) can't be converted to complex_float"); | |||
| 25193 | if (f2py_success) { | |||
| 25194 | /* Processing variable beta */ | |||
| 25195 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 25196 | f2py_success = complex_float_from_pyobj(&beta,beta_capi,"_fblas.cher2k() 1st keyword (beta) can't be converted to complex_float"); | |||
| 25197 | if (f2py_success) { | |||
| 25198 | /* Processing variable a */ | |||
| 25199 | ; | |||
| 25200 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 25201 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 25202 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 25203 | if (!PyErr_Occurred()) | |||
| 25204 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.cher2k to C/Fortran array" ); | |||
| 25205 | } else { | |||
| 25206 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 25207 | ||||
| 25208 | /* Processing variable b */ | |||
| 25209 | ; | |||
| 25210 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 25211 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 25212 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 25213 | if (!PyErr_Occurred()) | |||
| 25214 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.cher2k to C/Fortran array" ); | |||
| 25215 | } else { | |||
| 25216 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 25217 | ||||
| 25218 | /* Processing variable lda */ | |||
| 25219 | lda = shape(a,0)a_Dims[0]; | |||
| 25220 | /* Processing variable ka */ | |||
| 25221 | ka = shape(a,1)a_Dims[1]; | |||
| 25222 | /* Processing variable ldb */ | |||
| 25223 | ldb = shape(b,0)b_Dims[0]; | |||
| 25224 | /* Processing variable kb */ | |||
| 25225 | kb = shape(b,1)b_Dims[1]; | |||
| 25226 | /* Processing variable n */ | |||
| 25227 | n = (trans ? ka : lda); | |||
| 25228 | /* Processing variable k */ | |||
| 25229 | k = (trans ? lda : ka); | |||
| 25230 | CHECKSCALAR(trans ? lda==ldb: ka==kb,"trans ? lda==ldb: ka==kb","hidden k","cher2k:k=%d",k)if (!(trans ? lda==ldb: ka==kb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""cher2k:k=%d", "(""trans ? lda==ldb: ka==kb"") failed for " "hidden k", k); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 25231 | /* Processing variable c */ | |||
| 25232 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 25233 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 25234 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 25235 | capi_c_tmp = array_from_pyobj(NPY_CFLOAT,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 25236 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 25237 | if (!PyErr_Occurred()) | |||
| 25238 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.cher2k to C/Fortran array" ); | |||
| 25239 | } else { | |||
| 25240 | c = (complex_float *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 25241 | ||||
| 25242 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 25243 | /*end of frompyobj*/ | |||
| 25244 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25245 | f2py_start_call_clock(); | |||
| 25246 | #endif | |||
| 25247 | /*callfortranroutine*/ | |||
| 25248 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&n) ; | |||
| 25249 | /*(*f2py_func)(&n,&k,&alpha,a,b,&beta,c,&trans,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 25250 | if (PyErr_Occurred()) | |||
| 25251 | f2py_success = 0; | |||
| 25252 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25253 | f2py_stop_call_clock(); | |||
| 25254 | #endif | |||
| 25255 | /*end of callfortranroutine*/ | |||
| 25256 | if (f2py_success) { | |||
| 25257 | /*pyobjfrom*/ | |||
| 25258 | /*end of pyobjfrom*/ | |||
| 25259 | CFUNCSMESS("Building return value.\n"); | |||
| 25260 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 25261 | /*closepyobjfrom*/ | |||
| 25262 | /*end of closepyobjfrom*/ | |||
| 25263 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 25264 | /*cleanupfrompyobj*/ | |||
| 25265 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 25266 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 25267 | /* End of cleaning variable c */ | |||
| 25268 | } /*CHECKSCALAR(trans ? lda==ldb: ka==kb)*/ | |||
| 25269 | /* End of cleaning variable k */ | |||
| 25270 | /* End of cleaning variable n */ | |||
| 25271 | /* End of cleaning variable kb */ | |||
| 25272 | /* End of cleaning variable ldb */ | |||
| 25273 | /* End of cleaning variable ka */ | |||
| 25274 | /* End of cleaning variable lda */ | |||
| 25275 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 25276 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 25277 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 25278 | /* End of cleaning variable b */ | |||
| 25279 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 25280 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 25281 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 25282 | /* End of cleaning variable a */ | |||
| 25283 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 25284 | /* End of cleaning variable beta */ | |||
| 25285 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 25286 | /* End of cleaning variable alpha */ | |||
| 25287 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 25288 | } /*if (f2py_success) of trans*/ | |||
| 25289 | /* End of cleaning variable trans */ | |||
| 25290 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 25291 | } /*if (f2py_success) of lower*/ | |||
| 25292 | /* End of cleaning variable lower */ | |||
| 25293 | /*end of cleanupfrompyobj*/ | |||
| 25294 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 25295 | /*routdebugfailure*/ | |||
| 25296 | } else { | |||
| 25297 | /*routdebugleave*/ | |||
| 25298 | } | |||
| 25299 | CFUNCSMESS("Freeing memory.\n"); | |||
| 25300 | /*freemem*/ | |||
| 25301 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25302 | f2py_stop_clock(); | |||
| 25303 | #endif | |||
| 25304 | return capi_buildvalue; | |||
| 25305 | } | |||
| 25306 | /******************************* end of cher2k *******************************/ | |||
| 25307 | ||||
| 25308 | /*********************************** zher2k ***********************************/ | |||
| 25309 | static char doc_f2py_rout__fblas_zher2k[] = "\ | |||
| 25310 | c = zher2k(alpha,a,b,[beta,c,trans,lower,overwrite_c])\n\nWrapper for ``zher2k``.\ | |||
| 25311 | \n\nParameters\n----------\n" | |||
| 25312 | "alpha : input complex\n" | |||
| 25313 | "a : input rank-2 array('D') with bounds (lda,ka)\n" | |||
| 25314 | "b : input rank-2 array('D') with bounds (ldb,kb)\n" | |||
| 25315 | "\nOther Parameters\n----------------\n" | |||
| 25316 | "beta : input complex, optional\n Default: (0.0, 0.0)\n" | |||
| 25317 | "c : input rank-2 array('D') with bounds (n,n)\n" | |||
| 25318 | "overwrite_c : input int, optional\n Default: 0\n" | |||
| 25319 | "trans : input int, optional\n Default: 0\n" | |||
| 25320 | "lower : input int, optional\n Default: 0\n" | |||
| 25321 | "\nReturns\n-------\n" | |||
| 25322 | "c : rank-2 array('D') with bounds (n,n)"; | |||
| 25323 | /* extern void F_FUNC(zher2k,ZHER2K)(char*,char*,F_INT*,F_INT*,complex_double*,complex_double*,F_INT*,complex_double*,F_INT*, complex_double*, complex_double*,F_INT* ); */ | |||
| 25324 | static PyObject *f2py_rout__fblas_zher2k(const PyObject *capi_self, | |||
| 25325 | PyObject *capi_args, | |||
| 25326 | PyObject *capi_keywds, | |||
| 25327 | void (*f2py_func)(char*,char*,F_INTint*,F_INTint*,complex_double*,complex_double*,F_INTint*,complex_double*,F_INTint*, complex_double*, complex_double*,F_INTint* )) { | |||
| 25328 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 25329 | volatile int f2py_success = 1; | |||
| 25330 | /*decl*/ | |||
| 25331 | ||||
| 25332 | int n = 0; | |||
| 25333 | int k = 0; | |||
| 25334 | complex_double alpha; | |||
| 25335 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 25336 | complex_double *a = NULL((void*)0); | |||
| 25337 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 25338 | const int a_Rank = 2; | |||
| 25339 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 25340 | int capi_a_intent = 0; | |||
| 25341 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 25342 | complex_double *b = NULL((void*)0); | |||
| 25343 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 25344 | const int b_Rank = 2; | |||
| 25345 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 25346 | int capi_b_intent = 0; | |||
| 25347 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 25348 | complex_double beta; | |||
| 25349 | PyObject *beta_capi = Py_None(&_Py_NoneStruct); | |||
| 25350 | complex_double *c = NULL((void*)0); | |||
| 25351 | npy_intp c_Dims[2] = {-1, -1}; | |||
| 25352 | const int c_Rank = 2; | |||
| 25353 | PyArrayObject *capi_c_tmp = NULL((void*)0); | |||
| 25354 | int capi_c_intent = 0; | |||
| 25355 | int capi_overwrite_c = 0; | |||
| 25356 | PyObject *c_capi = Py_None(&_Py_NoneStruct); | |||
| 25357 | int trans = 0; | |||
| 25358 | PyObject *trans_capi = Py_None(&_Py_NoneStruct); | |||
| 25359 | int lower = 0; | |||
| 25360 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 25361 | int lda = 0; | |||
| 25362 | int ka = 0; | |||
| 25363 | int ldb = 0; | |||
| 25364 | int kb = 0; | |||
| 25365 | static char *capi_kwlist[] = {"alpha","a","b","beta","c","trans","lower","overwrite_c",NULL((void*)0)}; | |||
| 25366 | ||||
| 25367 | /*routdebugenter*/ | |||
| 25368 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25369 | f2py_start_clock(); | |||
| 25370 | #endif | |||
| 25371 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 25372 | "OOO|OOOOi:_fblas.zher2k",\ | |||
| 25373 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&beta_capi,&c_capi,&trans_capi,&lower_capi,&capi_overwrite_c)) | |||
| 25374 | return NULL((void*)0); | |||
| 25375 | /*frompyobj*/ | |||
| 25376 | /* Processing variable lower */ | |||
| 25377 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 25378 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.zher2k() 4th keyword (lower) can't be converted to int"); | |||
| 25379 | if (f2py_success) { | |||
| 25380 | CHECKSCALAR(lower==0||lower==1,"lower==0||lower==1","4th keyword lower","zher2k:lower=%d",lower)if (!(lower==0||lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher2k:lower=%d", "(""lower==0||lower==1"") failed for " "4th keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25381 | /* Processing variable trans */ | |||
| 25382 | if (trans_capi == Py_None(&_Py_NoneStruct)) trans = 0; else | |||
| 25383 | f2py_success = int_from_pyobj(&trans,trans_capi,"_fblas.zher2k() 3rd keyword (trans) can't be converted to int"); | |||
| 25384 | if (f2py_success) { | |||
| 25385 | CHECKSCALAR(trans>=0 && trans <=2,"trans>=0 && trans <=2","3rd keyword trans","zher2k:trans=%d",trans)if (!(trans>=0 && trans <=2)) { char errstring[ 256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""zher2k:trans=%d", "(""trans>=0 && trans <=2" ") failed for ""3rd keyword trans", trans); PyErr_SetString(_fblas_error ,errstring); } else { | |||
| 25386 | /* Processing variable alpha */ | |||
| 25387 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.zher2k() 1st argument (alpha) can't be converted to complex_double"); | |||
| 25388 | if (f2py_success) { | |||
| 25389 | /* Processing variable beta */ | |||
| 25390 | if (beta_capi==Py_None(&_Py_NoneStruct)) {beta.r = 0.0, beta.i = 0.0;} else | |||
| 25391 | f2py_success = complex_double_from_pyobj(&beta,beta_capi,"_fblas.zher2k() 1st keyword (beta) can't be converted to complex_double"); | |||
| 25392 | if (f2py_success) { | |||
| 25393 | /* Processing variable a */ | |||
| 25394 | ; | |||
| 25395 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 25396 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 25397 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 25398 | if (!PyErr_Occurred()) | |||
| 25399 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.zher2k to C/Fortran array" ); | |||
| 25400 | } else { | |||
| 25401 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 25402 | ||||
| 25403 | /* Processing variable b */ | |||
| 25404 | ; | |||
| 25405 | capi_b_intent |= F2PY_INTENT_IN1; | |||
| 25406 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 25407 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 25408 | if (!PyErr_Occurred()) | |||
| 25409 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.zher2k to C/Fortran array" ); | |||
| 25410 | } else { | |||
| 25411 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 25412 | ||||
| 25413 | /* Processing variable lda */ | |||
| 25414 | lda = shape(a,0)a_Dims[0]; | |||
| 25415 | /* Processing variable ka */ | |||
| 25416 | ka = shape(a,1)a_Dims[1]; | |||
| 25417 | /* Processing variable ldb */ | |||
| 25418 | ldb = shape(b,0)b_Dims[0]; | |||
| 25419 | /* Processing variable kb */ | |||
| 25420 | kb = shape(b,1)b_Dims[1]; | |||
| 25421 | /* Processing variable n */ | |||
| 25422 | n = (trans ? ka : lda); | |||
| 25423 | /* Processing variable k */ | |||
| 25424 | k = (trans ? lda : ka); | |||
| 25425 | CHECKSCALAR(trans ? lda==ldb: ka==kb,"trans ? lda==ldb: ka==kb","hidden k","zher2k:k=%d",k)if (!(trans ? lda==ldb: ka==kb)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""zher2k:k=%d", "(""trans ? lda==ldb: ka==kb"") failed for " "hidden k", k); PyErr_SetString(_fblas_error,errstring); } else { | |||
| 25426 | /* Processing variable c */ | |||
| 25427 | capi_c_intent |= (capi_overwrite_c?0:F2PY_INTENT_COPY32); | |||
| 25428 | c_Dims[0]=n,c_Dims[1]=n; | |||
| 25429 | capi_c_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4|F2PY_OPTIONAL128; | |||
| 25430 | capi_c_tmp = array_from_pyobj(NPY_CDOUBLE,c_Dims,c_Rank,capi_c_intent,c_capi); | |||
| 25431 | if (capi_c_tmp == NULL((void*)0)) { | |||
| 25432 | if (!PyErr_Occurred()) | |||
| 25433 | PyErr_SetString(_fblas_error,"failed in converting 2nd keyword `c' of _fblas.zher2k to C/Fortran array" ); | |||
| 25434 | } else { | |||
| 25435 | c = (complex_double *)(PyArray_DATA(capi_c_tmp)((void *)((PyArrayObject_fields *)(capi_c_tmp))->data)); | |||
| 25436 | ||||
| 25437 | CHECKARRAY(shape(c,0)==n && shape(c,1)==n,"shape(c,0)==n && shape(c,1)==n","2nd keyword c")if (!(c_Dims[0]==n && c_Dims[1]==n)) { PyErr_SetString (_fblas_error,"(""shape(c,0)==n && shape(c,1)==n"") failed for " "2nd keyword c"); } else { | |||
| 25438 | /*end of frompyobj*/ | |||
| 25439 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25440 | f2py_start_call_clock(); | |||
| 25441 | #endif | |||
| 25442 | /*callfortranroutine*/ | |||
| 25443 | (*f2py_func)((lower?"L":"U"), (trans?(trans==2?"C":"T"):"N"), &n,&k,&alpha,a,&lda,b,&ldb,&beta,c,&n) ; | |||
| 25444 | /*(*f2py_func)(&n,&k,&alpha,a,b,&beta,c,&trans,&lower,&lda,&ka,&ldb,&kb);*/ | |||
| 25445 | if (PyErr_Occurred()) | |||
| 25446 | f2py_success = 0; | |||
| 25447 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25448 | f2py_stop_call_clock(); | |||
| 25449 | #endif | |||
| 25450 | /*end of callfortranroutine*/ | |||
| 25451 | if (f2py_success) { | |||
| 25452 | /*pyobjfrom*/ | |||
| 25453 | /*end of pyobjfrom*/ | |||
| 25454 | CFUNCSMESS("Building return value.\n"); | |||
| 25455 | capi_buildvalue = Py_BuildValue("N",capi_c_tmp); | |||
| 25456 | /*closepyobjfrom*/ | |||
| 25457 | /*end of closepyobjfrom*/ | |||
| 25458 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 25459 | /*cleanupfrompyobj*/ | |||
| 25460 | } /*CHECKARRAY(shape(c,0)==n && shape(c,1)==n)*/ | |||
| 25461 | } /*if (capi_c_tmp == NULL) ... else of c*/ | |||
| 25462 | /* End of cleaning variable c */ | |||
| 25463 | } /*CHECKSCALAR(trans ? lda==ldb: ka==kb)*/ | |||
| 25464 | /* End of cleaning variable k */ | |||
| 25465 | /* End of cleaning variable n */ | |||
| 25466 | /* End of cleaning variable kb */ | |||
| 25467 | /* End of cleaning variable ldb */ | |||
| 25468 | /* End of cleaning variable ka */ | |||
| 25469 | /* End of cleaning variable lda */ | |||
| 25470 | if((PyObject *)capi_b_tmp!=b_capi) { | |||
| 25471 | Py_XDECREF(capi_b_tmp)_Py_XDECREF(((PyObject*)(capi_b_tmp))); } | |||
| 25472 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 25473 | /* End of cleaning variable b */ | |||
| 25474 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 25475 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 25476 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 25477 | /* End of cleaning variable a */ | |||
| 25478 | } /*if (f2py_success) of beta frompyobj*/ | |||
| 25479 | /* End of cleaning variable beta */ | |||
| 25480 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 25481 | /* End of cleaning variable alpha */ | |||
| 25482 | } /*CHECKSCALAR(trans>=0 && trans <=2)*/ | |||
| 25483 | } /*if (f2py_success) of trans*/ | |||
| 25484 | /* End of cleaning variable trans */ | |||
| 25485 | } /*CHECKSCALAR(lower==0||lower==1)*/ | |||
| 25486 | } /*if (f2py_success) of lower*/ | |||
| 25487 | /* End of cleaning variable lower */ | |||
| 25488 | /*end of cleanupfrompyobj*/ | |||
| 25489 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 25490 | /*routdebugfailure*/ | |||
| 25491 | } else { | |||
| 25492 | /*routdebugleave*/ | |||
| 25493 | } | |||
| 25494 | CFUNCSMESS("Freeing memory.\n"); | |||
| 25495 | /*freemem*/ | |||
| 25496 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25497 | f2py_stop_clock(); | |||
| 25498 | #endif | |||
| 25499 | return capi_buildvalue; | |||
| 25500 | } | |||
| 25501 | /******************************* end of zher2k *******************************/ | |||
| 25502 | ||||
| 25503 | /*********************************** strmm ***********************************/ | |||
| 25504 | static char doc_f2py_rout__fblas_strmm[] = "\ | |||
| 25505 | b = strmm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``strmm``.\ | |||
| 25506 | \n\nParameters\n----------\n" | |||
| 25507 | "alpha : input float\n" | |||
| 25508 | "a : input rank-2 array('f') with bounds (lda,k)\n" | |||
| 25509 | "b : input rank-2 array('f') with bounds (ldb,n)\n" | |||
| 25510 | "\nOther Parameters\n----------------\n" | |||
| 25511 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 25512 | "side : input int, optional\n Default: 0\n" | |||
| 25513 | "lower : input int, optional\n Default: 0\n" | |||
| 25514 | "trans_a : input int, optional\n Default: 0\n" | |||
| 25515 | "diag : input int, optional\n Default: 0\n" | |||
| 25516 | "\nReturns\n-------\n" | |||
| 25517 | "b : rank-2 array('f') with bounds (ldb,n)"; | |||
| 25518 | /* extern void F_FUNC(strmm,STRMM)(char*, char*, char*, char*, F_INT*, F_INT*, float*,float*,F_INT*,float*, F_INT* ); */ | |||
| 25519 | static PyObject *f2py_rout__fblas_strmm(const PyObject *capi_self, | |||
| 25520 | PyObject *capi_args, | |||
| 25521 | PyObject *capi_keywds, | |||
| 25522 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, float*,float*,F_INTint*,float*, F_INTint* )) { | |||
| 25523 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 25524 | volatile int f2py_success = 1; | |||
| 25525 | /*decl*/ | |||
| 25526 | ||||
| 25527 | int m = 0; | |||
| 25528 | int n = 0; | |||
| 25529 | int k = 0; | |||
| 25530 | float alpha = 0; | |||
| 25531 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 25532 | float *a = NULL((void*)0); | |||
| 25533 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 25534 | const int a_Rank = 2; | |||
| 25535 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 25536 | int capi_a_intent = 0; | |||
| 25537 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 25538 | float *b = NULL((void*)0); | |||
| 25539 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 25540 | const int b_Rank = 2; | |||
| 25541 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 25542 | int capi_b_intent = 0; | |||
| 25543 | int capi_overwrite_b = 0; | |||
| 25544 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 25545 | int lda = 0; | |||
| 25546 | int ldb = 0; | |||
| 25547 | int side = 0; | |||
| 25548 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 25549 | int lower = 0; | |||
| 25550 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 25551 | int trans_a = 0; | |||
| 25552 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 25553 | int diag = 0; | |||
| 25554 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 25555 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 25556 | ||||
| 25557 | /*routdebugenter*/ | |||
| 25558 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25559 | f2py_start_clock(); | |||
| 25560 | #endif | |||
| 25561 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 25562 | "OOO|OOOOi:_fblas.strmm",\ | |||
| 25563 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 25564 | return NULL((void*)0); | |||
| 25565 | /*frompyobj*/ | |||
| 25566 | /* Processing variable side */ | |||
| 25567 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 25568 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.strmm() 1st keyword (side) can't be converted to int"); | |||
| 25569 | if (f2py_success) { | |||
| 25570 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","strmm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strmm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25571 | /* Processing variable lower */ | |||
| 25572 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 25573 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.strmm() 2nd keyword (lower) can't be converted to int"); | |||
| 25574 | if (f2py_success) { | |||
| 25575 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","strmm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strmm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25576 | /* Processing variable trans_a */ | |||
| 25577 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 25578 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.strmm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 25579 | if (f2py_success) { | |||
| 25580 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","strmm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strmm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 25581 | /* Processing variable diag */ | |||
| 25582 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 25583 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.strmm() 4th keyword (diag) can't be converted to int"); | |||
| 25584 | if (f2py_success) { | |||
| 25585 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","strmm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strmm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25586 | /* Processing variable alpha */ | |||
| 25587 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.strmm() 1st argument (alpha) can't be converted to float"); | |||
| 25588 | if (f2py_success) { | |||
| 25589 | /* Processing variable a */ | |||
| 25590 | ; | |||
| 25591 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 25592 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 25593 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 25594 | if (!PyErr_Occurred()) | |||
| 25595 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.strmm to C/Fortran array" ); | |||
| 25596 | } else { | |||
| 25597 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 25598 | ||||
| 25599 | /* Processing variable b */ | |||
| 25600 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 25601 | ; | |||
| 25602 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 25603 | capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 25604 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 25605 | if (!PyErr_Occurred()) | |||
| 25606 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.strmm to C/Fortran array" ); | |||
| 25607 | } else { | |||
| 25608 | b = (float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 25609 | ||||
| 25610 | /* Processing variable lda */ | |||
| 25611 | lda = MAX(1,shape(a, 0))((1 > a_Dims[0]) ? (1) : (a_Dims[0])); | |||
| 25612 | /* Processing variable ldb */ | |||
| 25613 | ldb = MAX(1,shape(b, 0))((1 > b_Dims[0]) ? (1) : (b_Dims[0])); | |||
| 25614 | /* Processing variable m */ | |||
| 25615 | m = shape(b, 0)b_Dims[0]; | |||
| 25616 | /* Processing variable n */ | |||
| 25617 | n = shape(b, 1)b_Dims[1]; | |||
| 25618 | /* Processing variable k */ | |||
| 25619 | k = shape(a, 1)a_Dims[1]; | |||
| 25620 | CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0),"k>=(side?n:m) && k<=shape(a, 0)","hidden k","strmm:k=%d",k)if (!(k>=(side?n:m) && k<=a_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strmm:k=%d", "(""k>=(side?n:m) && k<=shape(a, 0)" ") failed for ""hidden k", k); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25621 | /*end of frompyobj*/ | |||
| 25622 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25623 | f2py_start_call_clock(); | |||
| 25624 | #endif | |||
| 25625 | /*callfortranroutine*/ | |||
| 25626 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),(trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 25627 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 25628 | if (PyErr_Occurred()) | |||
| 25629 | f2py_success = 0; | |||
| 25630 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25631 | f2py_stop_call_clock(); | |||
| 25632 | #endif | |||
| 25633 | /*end of callfortranroutine*/ | |||
| 25634 | if (f2py_success) { | |||
| 25635 | /*pyobjfrom*/ | |||
| 25636 | /*end of pyobjfrom*/ | |||
| 25637 | CFUNCSMESS("Building return value.\n"); | |||
| 25638 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 25639 | /*closepyobjfrom*/ | |||
| 25640 | /*end of closepyobjfrom*/ | |||
| 25641 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 25642 | /*cleanupfrompyobj*/ | |||
| 25643 | } /*CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0))*/ | |||
| 25644 | /* End of cleaning variable k */ | |||
| 25645 | /* End of cleaning variable n */ | |||
| 25646 | /* End of cleaning variable m */ | |||
| 25647 | /* End of cleaning variable ldb */ | |||
| 25648 | /* End of cleaning variable lda */ | |||
| 25649 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 25650 | /* End of cleaning variable b */ | |||
| 25651 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 25652 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 25653 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 25654 | /* End of cleaning variable a */ | |||
| 25655 | } /*if (f2py_success) of alpha*/ | |||
| 25656 | /* End of cleaning variable alpha */ | |||
| 25657 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 25658 | } /*if (f2py_success) of diag*/ | |||
| 25659 | /* End of cleaning variable diag */ | |||
| 25660 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 25661 | } /*if (f2py_success) of trans_a*/ | |||
| 25662 | /* End of cleaning variable trans_a */ | |||
| 25663 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 25664 | } /*if (f2py_success) of lower*/ | |||
| 25665 | /* End of cleaning variable lower */ | |||
| 25666 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 25667 | } /*if (f2py_success) of side*/ | |||
| 25668 | /* End of cleaning variable side */ | |||
| 25669 | /*end of cleanupfrompyobj*/ | |||
| 25670 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 25671 | /*routdebugfailure*/ | |||
| 25672 | } else { | |||
| 25673 | /*routdebugleave*/ | |||
| 25674 | } | |||
| 25675 | CFUNCSMESS("Freeing memory.\n"); | |||
| 25676 | /*freemem*/ | |||
| 25677 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25678 | f2py_stop_clock(); | |||
| 25679 | #endif | |||
| 25680 | return capi_buildvalue; | |||
| 25681 | } | |||
| 25682 | /******************************** end of strmm ********************************/ | |||
| 25683 | ||||
| 25684 | /*********************************** dtrmm ***********************************/ | |||
| 25685 | static char doc_f2py_rout__fblas_dtrmm[] = "\ | |||
| 25686 | b = dtrmm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``dtrmm``.\ | |||
| 25687 | \n\nParameters\n----------\n" | |||
| 25688 | "alpha : input float\n" | |||
| 25689 | "a : input rank-2 array('d') with bounds (lda,k)\n" | |||
| 25690 | "b : input rank-2 array('d') with bounds (ldb,n)\n" | |||
| 25691 | "\nOther Parameters\n----------------\n" | |||
| 25692 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 25693 | "side : input int, optional\n Default: 0\n" | |||
| 25694 | "lower : input int, optional\n Default: 0\n" | |||
| 25695 | "trans_a : input int, optional\n Default: 0\n" | |||
| 25696 | "diag : input int, optional\n Default: 0\n" | |||
| 25697 | "\nReturns\n-------\n" | |||
| 25698 | "b : rank-2 array('d') with bounds (ldb,n)"; | |||
| 25699 | /* extern void F_FUNC(dtrmm,DTRMM)(char*, char*, char*, char*, F_INT*, F_INT*, double*,double*,F_INT*,double*, F_INT* ); */ | |||
| 25700 | static PyObject *f2py_rout__fblas_dtrmm(const PyObject *capi_self, | |||
| 25701 | PyObject *capi_args, | |||
| 25702 | PyObject *capi_keywds, | |||
| 25703 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, double*,double*,F_INTint*,double*, F_INTint* )) { | |||
| 25704 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 25705 | volatile int f2py_success = 1; | |||
| 25706 | /*decl*/ | |||
| 25707 | ||||
| 25708 | int m = 0; | |||
| 25709 | int n = 0; | |||
| 25710 | int k = 0; | |||
| 25711 | double alpha = 0; | |||
| 25712 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 25713 | double *a = NULL((void*)0); | |||
| 25714 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 25715 | const int a_Rank = 2; | |||
| 25716 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 25717 | int capi_a_intent = 0; | |||
| 25718 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 25719 | double *b = NULL((void*)0); | |||
| 25720 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 25721 | const int b_Rank = 2; | |||
| 25722 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 25723 | int capi_b_intent = 0; | |||
| 25724 | int capi_overwrite_b = 0; | |||
| 25725 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 25726 | int lda = 0; | |||
| 25727 | int ldb = 0; | |||
| 25728 | int side = 0; | |||
| 25729 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 25730 | int lower = 0; | |||
| 25731 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 25732 | int trans_a = 0; | |||
| 25733 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 25734 | int diag = 0; | |||
| 25735 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 25736 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 25737 | ||||
| 25738 | /*routdebugenter*/ | |||
| 25739 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25740 | f2py_start_clock(); | |||
| 25741 | #endif | |||
| 25742 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 25743 | "OOO|OOOOi:_fblas.dtrmm",\ | |||
| 25744 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 25745 | return NULL((void*)0); | |||
| 25746 | /*frompyobj*/ | |||
| 25747 | /* Processing variable side */ | |||
| 25748 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 25749 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.dtrmm() 1st keyword (side) can't be converted to int"); | |||
| 25750 | if (f2py_success) { | |||
| 25751 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","dtrmm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrmm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25752 | /* Processing variable lower */ | |||
| 25753 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 25754 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtrmm() 2nd keyword (lower) can't be converted to int"); | |||
| 25755 | if (f2py_success) { | |||
| 25756 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","dtrmm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrmm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25757 | /* Processing variable trans_a */ | |||
| 25758 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 25759 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.dtrmm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 25760 | if (f2py_success) { | |||
| 25761 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","dtrmm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrmm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 25762 | /* Processing variable diag */ | |||
| 25763 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 25764 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtrmm() 4th keyword (diag) can't be converted to int"); | |||
| 25765 | if (f2py_success) { | |||
| 25766 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","dtrmm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrmm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25767 | /* Processing variable alpha */ | |||
| 25768 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dtrmm() 1st argument (alpha) can't be converted to double"); | |||
| 25769 | if (f2py_success) { | |||
| 25770 | /* Processing variable a */ | |||
| 25771 | ; | |||
| 25772 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 25773 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 25774 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 25775 | if (!PyErr_Occurred()) | |||
| 25776 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dtrmm to C/Fortran array" ); | |||
| 25777 | } else { | |||
| 25778 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 25779 | ||||
| 25780 | /* Processing variable b */ | |||
| 25781 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 25782 | ; | |||
| 25783 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 25784 | capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 25785 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 25786 | if (!PyErr_Occurred()) | |||
| 25787 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.dtrmm to C/Fortran array" ); | |||
| 25788 | } else { | |||
| 25789 | b = (double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 25790 | ||||
| 25791 | /* Processing variable lda */ | |||
| 25792 | lda = MAX(1,shape(a, 0))((1 > a_Dims[0]) ? (1) : (a_Dims[0])); | |||
| 25793 | /* Processing variable ldb */ | |||
| 25794 | ldb = MAX(1,shape(b, 0))((1 > b_Dims[0]) ? (1) : (b_Dims[0])); | |||
| 25795 | /* Processing variable m */ | |||
| 25796 | m = shape(b, 0)b_Dims[0]; | |||
| 25797 | /* Processing variable n */ | |||
| 25798 | n = shape(b, 1)b_Dims[1]; | |||
| 25799 | /* Processing variable k */ | |||
| 25800 | k = shape(a, 1)a_Dims[1]; | |||
| 25801 | CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0),"k>=(side?n:m) && k<=shape(a, 0)","hidden k","dtrmm:k=%d",k)if (!(k>=(side?n:m) && k<=a_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrmm:k=%d", "(""k>=(side?n:m) && k<=shape(a, 0)" ") failed for ""hidden k", k); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25802 | /*end of frompyobj*/ | |||
| 25803 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25804 | f2py_start_call_clock(); | |||
| 25805 | #endif | |||
| 25806 | /*callfortranroutine*/ | |||
| 25807 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),(trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 25808 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 25809 | if (PyErr_Occurred()) | |||
| 25810 | f2py_success = 0; | |||
| 25811 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25812 | f2py_stop_call_clock(); | |||
| 25813 | #endif | |||
| 25814 | /*end of callfortranroutine*/ | |||
| 25815 | if (f2py_success) { | |||
| 25816 | /*pyobjfrom*/ | |||
| 25817 | /*end of pyobjfrom*/ | |||
| 25818 | CFUNCSMESS("Building return value.\n"); | |||
| 25819 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 25820 | /*closepyobjfrom*/ | |||
| 25821 | /*end of closepyobjfrom*/ | |||
| 25822 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 25823 | /*cleanupfrompyobj*/ | |||
| 25824 | } /*CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0))*/ | |||
| 25825 | /* End of cleaning variable k */ | |||
| 25826 | /* End of cleaning variable n */ | |||
| 25827 | /* End of cleaning variable m */ | |||
| 25828 | /* End of cleaning variable ldb */ | |||
| 25829 | /* End of cleaning variable lda */ | |||
| 25830 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 25831 | /* End of cleaning variable b */ | |||
| 25832 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 25833 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 25834 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 25835 | /* End of cleaning variable a */ | |||
| 25836 | } /*if (f2py_success) of alpha*/ | |||
| 25837 | /* End of cleaning variable alpha */ | |||
| 25838 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 25839 | } /*if (f2py_success) of diag*/ | |||
| 25840 | /* End of cleaning variable diag */ | |||
| 25841 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 25842 | } /*if (f2py_success) of trans_a*/ | |||
| 25843 | /* End of cleaning variable trans_a */ | |||
| 25844 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 25845 | } /*if (f2py_success) of lower*/ | |||
| 25846 | /* End of cleaning variable lower */ | |||
| 25847 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 25848 | } /*if (f2py_success) of side*/ | |||
| 25849 | /* End of cleaning variable side */ | |||
| 25850 | /*end of cleanupfrompyobj*/ | |||
| 25851 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 25852 | /*routdebugfailure*/ | |||
| 25853 | } else { | |||
| 25854 | /*routdebugleave*/ | |||
| 25855 | } | |||
| 25856 | CFUNCSMESS("Freeing memory.\n"); | |||
| 25857 | /*freemem*/ | |||
| 25858 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25859 | f2py_stop_clock(); | |||
| 25860 | #endif | |||
| 25861 | return capi_buildvalue; | |||
| 25862 | } | |||
| 25863 | /******************************** end of dtrmm ********************************/ | |||
| 25864 | ||||
| 25865 | /*********************************** ctrmm ***********************************/ | |||
| 25866 | static char doc_f2py_rout__fblas_ctrmm[] = "\ | |||
| 25867 | b = ctrmm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``ctrmm``.\ | |||
| 25868 | \n\nParameters\n----------\n" | |||
| 25869 | "alpha : input complex\n" | |||
| 25870 | "a : input rank-2 array('F') with bounds (lda,k)\n" | |||
| 25871 | "b : input rank-2 array('F') with bounds (ldb,n)\n" | |||
| 25872 | "\nOther Parameters\n----------------\n" | |||
| 25873 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 25874 | "side : input int, optional\n Default: 0\n" | |||
| 25875 | "lower : input int, optional\n Default: 0\n" | |||
| 25876 | "trans_a : input int, optional\n Default: 0\n" | |||
| 25877 | "diag : input int, optional\n Default: 0\n" | |||
| 25878 | "\nReturns\n-------\n" | |||
| 25879 | "b : rank-2 array('F') with bounds (ldb,n)"; | |||
| 25880 | /* extern void F_FUNC(ctrmm,CTRMM)(char*, char*, char*, char*, F_INT*, F_INT*, complex_float*,complex_float*,F_INT*,complex_float*, F_INT* ); */ | |||
| 25881 | static PyObject *f2py_rout__fblas_ctrmm(const PyObject *capi_self, | |||
| 25882 | PyObject *capi_args, | |||
| 25883 | PyObject *capi_keywds, | |||
| 25884 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint* )) { | |||
| 25885 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 25886 | volatile int f2py_success = 1; | |||
| 25887 | /*decl*/ | |||
| 25888 | ||||
| 25889 | int m = 0; | |||
| 25890 | int n = 0; | |||
| 25891 | int k = 0; | |||
| 25892 | complex_float alpha; | |||
| 25893 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 25894 | complex_float *a = NULL((void*)0); | |||
| 25895 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 25896 | const int a_Rank = 2; | |||
| 25897 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 25898 | int capi_a_intent = 0; | |||
| 25899 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 25900 | complex_float *b = NULL((void*)0); | |||
| 25901 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 25902 | const int b_Rank = 2; | |||
| 25903 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 25904 | int capi_b_intent = 0; | |||
| 25905 | int capi_overwrite_b = 0; | |||
| 25906 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 25907 | int lda = 0; | |||
| 25908 | int ldb = 0; | |||
| 25909 | int side = 0; | |||
| 25910 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 25911 | int lower = 0; | |||
| 25912 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 25913 | int trans_a = 0; | |||
| 25914 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 25915 | int diag = 0; | |||
| 25916 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 25917 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 25918 | ||||
| 25919 | /*routdebugenter*/ | |||
| 25920 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25921 | f2py_start_clock(); | |||
| 25922 | #endif | |||
| 25923 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 25924 | "OOO|OOOOi:_fblas.ctrmm",\ | |||
| 25925 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 25926 | return NULL((void*)0); | |||
| 25927 | /*frompyobj*/ | |||
| 25928 | /* Processing variable side */ | |||
| 25929 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 25930 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.ctrmm() 1st keyword (side) can't be converted to int"); | |||
| 25931 | if (f2py_success) { | |||
| 25932 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","ctrmm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrmm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25933 | /* Processing variable lower */ | |||
| 25934 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 25935 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctrmm() 2nd keyword (lower) can't be converted to int"); | |||
| 25936 | if (f2py_success) { | |||
| 25937 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","ctrmm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrmm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25938 | /* Processing variable trans_a */ | |||
| 25939 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 25940 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.ctrmm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 25941 | if (f2py_success) { | |||
| 25942 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","ctrmm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrmm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 25943 | /* Processing variable diag */ | |||
| 25944 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 25945 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctrmm() 4th keyword (diag) can't be converted to int"); | |||
| 25946 | if (f2py_success) { | |||
| 25947 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","ctrmm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrmm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25948 | /* Processing variable alpha */ | |||
| 25949 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.ctrmm() 1st argument (alpha) can't be converted to complex_float"); | |||
| 25950 | if (f2py_success) { | |||
| 25951 | /* Processing variable a */ | |||
| 25952 | ; | |||
| 25953 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 25954 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 25955 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 25956 | if (!PyErr_Occurred()) | |||
| 25957 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ctrmm to C/Fortran array" ); | |||
| 25958 | } else { | |||
| 25959 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 25960 | ||||
| 25961 | /* Processing variable b */ | |||
| 25962 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 25963 | ; | |||
| 25964 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 25965 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 25966 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 25967 | if (!PyErr_Occurred()) | |||
| 25968 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.ctrmm to C/Fortran array" ); | |||
| 25969 | } else { | |||
| 25970 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 25971 | ||||
| 25972 | /* Processing variable lda */ | |||
| 25973 | lda = MAX(1,shape(a, 0))((1 > a_Dims[0]) ? (1) : (a_Dims[0])); | |||
| 25974 | /* Processing variable ldb */ | |||
| 25975 | ldb = MAX(1,shape(b, 0))((1 > b_Dims[0]) ? (1) : (b_Dims[0])); | |||
| 25976 | /* Processing variable m */ | |||
| 25977 | m = shape(b, 0)b_Dims[0]; | |||
| 25978 | /* Processing variable n */ | |||
| 25979 | n = shape(b, 1)b_Dims[1]; | |||
| 25980 | /* Processing variable k */ | |||
| 25981 | k = shape(a, 1)a_Dims[1]; | |||
| 25982 | CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0),"k>=(side?n:m) && k<=shape(a, 0)","hidden k","ctrmm:k=%d",k)if (!(k>=(side?n:m) && k<=a_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrmm:k=%d", "(""k>=(side?n:m) && k<=shape(a, 0)" ") failed for ""hidden k", k); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 25983 | /*end of frompyobj*/ | |||
| 25984 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25985 | f2py_start_call_clock(); | |||
| 25986 | #endif | |||
| 25987 | /*callfortranroutine*/ | |||
| 25988 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),(trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 25989 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 25990 | if (PyErr_Occurred()) | |||
| 25991 | f2py_success = 0; | |||
| 25992 | #ifdef F2PY_REPORT_ATEXIT | |||
| 25993 | f2py_stop_call_clock(); | |||
| 25994 | #endif | |||
| 25995 | /*end of callfortranroutine*/ | |||
| 25996 | if (f2py_success) { | |||
| 25997 | /*pyobjfrom*/ | |||
| 25998 | /*end of pyobjfrom*/ | |||
| 25999 | CFUNCSMESS("Building return value.\n"); | |||
| 26000 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 26001 | /*closepyobjfrom*/ | |||
| 26002 | /*end of closepyobjfrom*/ | |||
| 26003 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 26004 | /*cleanupfrompyobj*/ | |||
| 26005 | } /*CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0))*/ | |||
| 26006 | /* End of cleaning variable k */ | |||
| 26007 | /* End of cleaning variable n */ | |||
| 26008 | /* End of cleaning variable m */ | |||
| 26009 | /* End of cleaning variable ldb */ | |||
| 26010 | /* End of cleaning variable lda */ | |||
| 26011 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 26012 | /* End of cleaning variable b */ | |||
| 26013 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 26014 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 26015 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 26016 | /* End of cleaning variable a */ | |||
| 26017 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 26018 | /* End of cleaning variable alpha */ | |||
| 26019 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 26020 | } /*if (f2py_success) of diag*/ | |||
| 26021 | /* End of cleaning variable diag */ | |||
| 26022 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 26023 | } /*if (f2py_success) of trans_a*/ | |||
| 26024 | /* End of cleaning variable trans_a */ | |||
| 26025 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 26026 | } /*if (f2py_success) of lower*/ | |||
| 26027 | /* End of cleaning variable lower */ | |||
| 26028 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 26029 | } /*if (f2py_success) of side*/ | |||
| 26030 | /* End of cleaning variable side */ | |||
| 26031 | /*end of cleanupfrompyobj*/ | |||
| 26032 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 26033 | /*routdebugfailure*/ | |||
| 26034 | } else { | |||
| 26035 | /*routdebugleave*/ | |||
| 26036 | } | |||
| 26037 | CFUNCSMESS("Freeing memory.\n"); | |||
| 26038 | /*freemem*/ | |||
| 26039 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26040 | f2py_stop_clock(); | |||
| 26041 | #endif | |||
| 26042 | return capi_buildvalue; | |||
| 26043 | } | |||
| 26044 | /******************************** end of ctrmm ********************************/ | |||
| 26045 | ||||
| 26046 | /*********************************** ztrmm ***********************************/ | |||
| 26047 | static char doc_f2py_rout__fblas_ztrmm[] = "\ | |||
| 26048 | b = ztrmm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``ztrmm``.\ | |||
| 26049 | \n\nParameters\n----------\n" | |||
| 26050 | "alpha : input complex\n" | |||
| 26051 | "a : input rank-2 array('D') with bounds (lda,k)\n" | |||
| 26052 | "b : input rank-2 array('D') with bounds (ldb,n)\n" | |||
| 26053 | "\nOther Parameters\n----------------\n" | |||
| 26054 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 26055 | "side : input int, optional\n Default: 0\n" | |||
| 26056 | "lower : input int, optional\n Default: 0\n" | |||
| 26057 | "trans_a : input int, optional\n Default: 0\n" | |||
| 26058 | "diag : input int, optional\n Default: 0\n" | |||
| 26059 | "\nReturns\n-------\n" | |||
| 26060 | "b : rank-2 array('D') with bounds (ldb,n)"; | |||
| 26061 | /* extern void F_FUNC(ztrmm,ZTRMM)(char*, char*, char*, char*, F_INT*, F_INT*, complex_double*,complex_double*,F_INT*,complex_double*, F_INT* ); */ | |||
| 26062 | static PyObject *f2py_rout__fblas_ztrmm(const PyObject *capi_self, | |||
| 26063 | PyObject *capi_args, | |||
| 26064 | PyObject *capi_keywds, | |||
| 26065 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint* )) { | |||
| 26066 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 26067 | volatile int f2py_success = 1; | |||
| 26068 | /*decl*/ | |||
| 26069 | ||||
| 26070 | int m = 0; | |||
| 26071 | int n = 0; | |||
| 26072 | int k = 0; | |||
| 26073 | complex_double alpha; | |||
| 26074 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 26075 | complex_double *a = NULL((void*)0); | |||
| 26076 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 26077 | const int a_Rank = 2; | |||
| 26078 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 26079 | int capi_a_intent = 0; | |||
| 26080 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 26081 | complex_double *b = NULL((void*)0); | |||
| 26082 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 26083 | const int b_Rank = 2; | |||
| 26084 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 26085 | int capi_b_intent = 0; | |||
| 26086 | int capi_overwrite_b = 0; | |||
| 26087 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 26088 | int lda = 0; | |||
| 26089 | int ldb = 0; | |||
| 26090 | int side = 0; | |||
| 26091 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 26092 | int lower = 0; | |||
| 26093 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 26094 | int trans_a = 0; | |||
| 26095 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 26096 | int diag = 0; | |||
| 26097 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 26098 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 26099 | ||||
| 26100 | /*routdebugenter*/ | |||
| 26101 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26102 | f2py_start_clock(); | |||
| 26103 | #endif | |||
| 26104 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 26105 | "OOO|OOOOi:_fblas.ztrmm",\ | |||
| 26106 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 26107 | return NULL((void*)0); | |||
| 26108 | /*frompyobj*/ | |||
| 26109 | /* Processing variable side */ | |||
| 26110 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 26111 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.ztrmm() 1st keyword (side) can't be converted to int"); | |||
| 26112 | if (f2py_success) { | |||
| 26113 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","ztrmm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrmm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26114 | /* Processing variable lower */ | |||
| 26115 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 26116 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztrmm() 2nd keyword (lower) can't be converted to int"); | |||
| 26117 | if (f2py_success) { | |||
| 26118 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","ztrmm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrmm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26119 | /* Processing variable trans_a */ | |||
| 26120 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 26121 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.ztrmm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 26122 | if (f2py_success) { | |||
| 26123 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","ztrmm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrmm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 26124 | /* Processing variable diag */ | |||
| 26125 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 26126 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztrmm() 4th keyword (diag) can't be converted to int"); | |||
| 26127 | if (f2py_success) { | |||
| 26128 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","ztrmm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrmm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26129 | /* Processing variable alpha */ | |||
| 26130 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.ztrmm() 1st argument (alpha) can't be converted to complex_double"); | |||
| 26131 | if (f2py_success) { | |||
| 26132 | /* Processing variable a */ | |||
| 26133 | ; | |||
| 26134 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 26135 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 26136 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 26137 | if (!PyErr_Occurred()) | |||
| 26138 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ztrmm to C/Fortran array" ); | |||
| 26139 | } else { | |||
| 26140 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 26141 | ||||
| 26142 | /* Processing variable b */ | |||
| 26143 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 26144 | ; | |||
| 26145 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 26146 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 26147 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 26148 | if (!PyErr_Occurred()) | |||
| 26149 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.ztrmm to C/Fortran array" ); | |||
| 26150 | } else { | |||
| 26151 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 26152 | ||||
| 26153 | /* Processing variable lda */ | |||
| 26154 | lda = MAX(1,shape(a, 0))((1 > a_Dims[0]) ? (1) : (a_Dims[0])); | |||
| 26155 | /* Processing variable ldb */ | |||
| 26156 | ldb = MAX(1,shape(b, 0))((1 > b_Dims[0]) ? (1) : (b_Dims[0])); | |||
| 26157 | /* Processing variable m */ | |||
| 26158 | m = shape(b, 0)b_Dims[0]; | |||
| 26159 | /* Processing variable n */ | |||
| 26160 | n = shape(b, 1)b_Dims[1]; | |||
| 26161 | /* Processing variable k */ | |||
| 26162 | k = shape(a, 1)a_Dims[1]; | |||
| 26163 | CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0),"k>=(side?n:m) && k<=shape(a, 0)","hidden k","ztrmm:k=%d",k)if (!(k>=(side?n:m) && k<=a_Dims[0])) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrmm:k=%d", "(""k>=(side?n:m) && k<=shape(a, 0)" ") failed for ""hidden k", k); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26164 | /*end of frompyobj*/ | |||
| 26165 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26166 | f2py_start_call_clock(); | |||
| 26167 | #endif | |||
| 26168 | /*callfortranroutine*/ | |||
| 26169 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"),(trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 26170 | /*(*f2py_func)(&m,&n,&k,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 26171 | if (PyErr_Occurred()) | |||
| 26172 | f2py_success = 0; | |||
| 26173 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26174 | f2py_stop_call_clock(); | |||
| 26175 | #endif | |||
| 26176 | /*end of callfortranroutine*/ | |||
| 26177 | if (f2py_success) { | |||
| 26178 | /*pyobjfrom*/ | |||
| 26179 | /*end of pyobjfrom*/ | |||
| 26180 | CFUNCSMESS("Building return value.\n"); | |||
| 26181 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 26182 | /*closepyobjfrom*/ | |||
| 26183 | /*end of closepyobjfrom*/ | |||
| 26184 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 26185 | /*cleanupfrompyobj*/ | |||
| 26186 | } /*CHECKSCALAR(k>=(side?n:m) && k<=shape(a, 0))*/ | |||
| 26187 | /* End of cleaning variable k */ | |||
| 26188 | /* End of cleaning variable n */ | |||
| 26189 | /* End of cleaning variable m */ | |||
| 26190 | /* End of cleaning variable ldb */ | |||
| 26191 | /* End of cleaning variable lda */ | |||
| 26192 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 26193 | /* End of cleaning variable b */ | |||
| 26194 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 26195 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 26196 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 26197 | /* End of cleaning variable a */ | |||
| 26198 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 26199 | /* End of cleaning variable alpha */ | |||
| 26200 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 26201 | } /*if (f2py_success) of diag*/ | |||
| 26202 | /* End of cleaning variable diag */ | |||
| 26203 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 26204 | } /*if (f2py_success) of trans_a*/ | |||
| 26205 | /* End of cleaning variable trans_a */ | |||
| 26206 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 26207 | } /*if (f2py_success) of lower*/ | |||
| 26208 | /* End of cleaning variable lower */ | |||
| 26209 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 26210 | } /*if (f2py_success) of side*/ | |||
| 26211 | /* End of cleaning variable side */ | |||
| 26212 | /*end of cleanupfrompyobj*/ | |||
| 26213 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 26214 | /*routdebugfailure*/ | |||
| 26215 | } else { | |||
| 26216 | /*routdebugleave*/ | |||
| 26217 | } | |||
| 26218 | CFUNCSMESS("Freeing memory.\n"); | |||
| 26219 | /*freemem*/ | |||
| 26220 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26221 | f2py_stop_clock(); | |||
| 26222 | #endif | |||
| 26223 | return capi_buildvalue; | |||
| 26224 | } | |||
| 26225 | /******************************** end of ztrmm ********************************/ | |||
| 26226 | ||||
| 26227 | /*********************************** strsm ***********************************/ | |||
| 26228 | static char doc_f2py_rout__fblas_strsm[] = "\ | |||
| 26229 | x = strsm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``strsm``.\ | |||
| 26230 | \n\nParameters\n----------\n" | |||
| 26231 | "alpha : input float\n" | |||
| 26232 | "a : input rank-2 array('f') with bounds (lda,*)\n" | |||
| 26233 | "b : input rank-2 array('f') with bounds (ldb,n)\n" | |||
| 26234 | "\nOther Parameters\n----------------\n" | |||
| 26235 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 26236 | "side : input int, optional\n Default: 0\n" | |||
| 26237 | "lower : input int, optional\n Default: 0\n" | |||
| 26238 | "trans_a : input int, optional\n Default: 0\n" | |||
| 26239 | "diag : input int, optional\n Default: 0\n" | |||
| 26240 | "\nReturns\n-------\n" | |||
| 26241 | "x : rank-2 array('f') with bounds (ldb,n) and b storage"; | |||
| 26242 | /* extern void F_FUNC(strsm,STRSM)(char*, char*, char*, char*, F_INT*, F_INT*, float*,float*,F_INT*,float*, F_INT* ); */ | |||
| 26243 | static PyObject *f2py_rout__fblas_strsm(const PyObject *capi_self, | |||
| 26244 | PyObject *capi_args, | |||
| 26245 | PyObject *capi_keywds, | |||
| 26246 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, float*,float*,F_INTint*,float*, F_INTint* )) { | |||
| 26247 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 26248 | volatile int f2py_success = 1; | |||
| 26249 | /*decl*/ | |||
| 26250 | ||||
| 26251 | int m = 0; | |||
| 26252 | int n = 0; | |||
| 26253 | float alpha = 0; | |||
| 26254 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 26255 | float *a = NULL((void*)0); | |||
| 26256 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 26257 | const int a_Rank = 2; | |||
| 26258 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 26259 | int capi_a_intent = 0; | |||
| 26260 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 26261 | float *b = NULL((void*)0); | |||
| 26262 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 26263 | const int b_Rank = 2; | |||
| 26264 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 26265 | int capi_b_intent = 0; | |||
| 26266 | int capi_overwrite_b = 0; | |||
| 26267 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 26268 | int lda = 0; | |||
| 26269 | int ldb = 0; | |||
| 26270 | int side = 0; | |||
| 26271 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 26272 | int lower = 0; | |||
| 26273 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 26274 | int trans_a = 0; | |||
| 26275 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 26276 | int diag = 0; | |||
| 26277 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 26278 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 26279 | ||||
| 26280 | /*routdebugenter*/ | |||
| 26281 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26282 | f2py_start_clock(); | |||
| 26283 | #endif | |||
| 26284 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 26285 | "OOO|OOOOi:_fblas.strsm",\ | |||
| 26286 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 26287 | return NULL((void*)0); | |||
| 26288 | /*frompyobj*/ | |||
| 26289 | /* Processing variable side */ | |||
| 26290 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 26291 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.strsm() 1st keyword (side) can't be converted to int"); | |||
| 26292 | if (f2py_success) { | |||
| 26293 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","strsm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26294 | /* Processing variable lower */ | |||
| 26295 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 26296 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.strsm() 2nd keyword (lower) can't be converted to int"); | |||
| 26297 | if (f2py_success) { | |||
| 26298 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","strsm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26299 | /* Processing variable trans_a */ | |||
| 26300 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 26301 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.strsm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 26302 | if (f2py_success) { | |||
| 26303 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","strsm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""strsm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 26304 | /* Processing variable diag */ | |||
| 26305 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 26306 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.strsm() 4th keyword (diag) can't be converted to int"); | |||
| 26307 | if (f2py_success) { | |||
| 26308 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","strsm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""strsm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26309 | /* Processing variable alpha */ | |||
| 26310 | f2py_success = float_from_pyobj(&alpha,alpha_capi,"_fblas.strsm() 1st argument (alpha) can't be converted to float"); | |||
| 26311 | if (f2py_success) { | |||
| 26312 | /* Processing variable b */ | |||
| 26313 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 26314 | ; | |||
| 26315 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 26316 | capi_b_tmp = array_from_pyobj(NPY_FLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 26317 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 26318 | if (!PyErr_Occurred()) | |||
| 26319 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.strsm to C/Fortran array" ); | |||
| 26320 | } else { | |||
| 26321 | b = (float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 26322 | ||||
| 26323 | /* Processing variable ldb */ | |||
| 26324 | ldb = MAX(shape(b, 0),1)((b_Dims[0] > 1) ? (b_Dims[0]) : (1)); | |||
| 26325 | /* Processing variable n */ | |||
| 26326 | n = shape(b, 1)b_Dims[1]; | |||
| 26327 | /* Processing variable m */ | |||
| 26328 | m = shape(b, 0)b_Dims[0]; | |||
| 26329 | /* Processing variable a */ | |||
| 26330 | ; | |||
| 26331 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 26332 | capi_a_tmp = array_from_pyobj(NPY_FLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 26333 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 26334 | if (!PyErr_Occurred()) | |||
| 26335 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.strsm to C/Fortran array" ); | |||
| 26336 | } else { | |||
| 26337 | a = (float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 26338 | ||||
| 26339 | CHECKARRAY(shape(a,0)==(side?n:m),"shape(a,0)==(side?n:m)","2nd argument a")if (!(a_Dims[0]==(side?n:m))) { PyErr_SetString(_fblas_error, "(""shape(a,0)==(side?n:m)"") failed for ""2nd argument a"); } else { | |||
| 26340 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 26341 | /* Processing variable lda */ | |||
| 26342 | lda = MAX(shape(a, 0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 26343 | /*end of frompyobj*/ | |||
| 26344 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26345 | f2py_start_call_clock(); | |||
| 26346 | #endif | |||
| 26347 | /*callfortranroutine*/ | |||
| 26348 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"), (trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 26349 | /*(*f2py_func)(&m,&n,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 26350 | if (PyErr_Occurred()) | |||
| 26351 | f2py_success = 0; | |||
| 26352 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26353 | f2py_stop_call_clock(); | |||
| 26354 | #endif | |||
| 26355 | /*end of callfortranroutine*/ | |||
| 26356 | if (f2py_success) { | |||
| 26357 | /*pyobjfrom*/ | |||
| 26358 | /*end of pyobjfrom*/ | |||
| 26359 | CFUNCSMESS("Building return value.\n"); | |||
| 26360 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 26361 | /*closepyobjfrom*/ | |||
| 26362 | /*end of closepyobjfrom*/ | |||
| 26363 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 26364 | /*cleanupfrompyobj*/ | |||
| 26365 | /* End of cleaning variable lda */ | |||
| 26366 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 26367 | } /*CHECKARRAY(shape(a,0)==(side?n:m))*/ | |||
| 26368 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 26369 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 26370 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 26371 | /* End of cleaning variable a */ | |||
| 26372 | /* End of cleaning variable m */ | |||
| 26373 | /* End of cleaning variable n */ | |||
| 26374 | /* End of cleaning variable ldb */ | |||
| 26375 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 26376 | /* End of cleaning variable b */ | |||
| 26377 | } /*if (f2py_success) of alpha*/ | |||
| 26378 | /* End of cleaning variable alpha */ | |||
| 26379 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 26380 | } /*if (f2py_success) of diag*/ | |||
| 26381 | /* End of cleaning variable diag */ | |||
| 26382 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 26383 | } /*if (f2py_success) of trans_a*/ | |||
| 26384 | /* End of cleaning variable trans_a */ | |||
| 26385 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 26386 | } /*if (f2py_success) of lower*/ | |||
| 26387 | /* End of cleaning variable lower */ | |||
| 26388 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 26389 | } /*if (f2py_success) of side*/ | |||
| 26390 | /* End of cleaning variable side */ | |||
| 26391 | /*end of cleanupfrompyobj*/ | |||
| 26392 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 26393 | /*routdebugfailure*/ | |||
| 26394 | } else { | |||
| 26395 | /*routdebugleave*/ | |||
| 26396 | } | |||
| 26397 | CFUNCSMESS("Freeing memory.\n"); | |||
| 26398 | /*freemem*/ | |||
| 26399 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26400 | f2py_stop_clock(); | |||
| 26401 | #endif | |||
| 26402 | return capi_buildvalue; | |||
| 26403 | } | |||
| 26404 | /******************************** end of strsm ********************************/ | |||
| 26405 | ||||
| 26406 | /*********************************** dtrsm ***********************************/ | |||
| 26407 | static char doc_f2py_rout__fblas_dtrsm[] = "\ | |||
| 26408 | x = dtrsm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``dtrsm``.\ | |||
| 26409 | \n\nParameters\n----------\n" | |||
| 26410 | "alpha : input float\n" | |||
| 26411 | "a : input rank-2 array('d') with bounds (lda,*)\n" | |||
| 26412 | "b : input rank-2 array('d') with bounds (ldb,n)\n" | |||
| 26413 | "\nOther Parameters\n----------------\n" | |||
| 26414 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 26415 | "side : input int, optional\n Default: 0\n" | |||
| 26416 | "lower : input int, optional\n Default: 0\n" | |||
| 26417 | "trans_a : input int, optional\n Default: 0\n" | |||
| 26418 | "diag : input int, optional\n Default: 0\n" | |||
| 26419 | "\nReturns\n-------\n" | |||
| 26420 | "x : rank-2 array('d') with bounds (ldb,n) and b storage"; | |||
| 26421 | /* extern void F_FUNC(dtrsm,DTRSM)(char*, char*, char*, char*, F_INT*, F_INT*, double*,double*,F_INT*,double*, F_INT* ); */ | |||
| 26422 | static PyObject *f2py_rout__fblas_dtrsm(const PyObject *capi_self, | |||
| 26423 | PyObject *capi_args, | |||
| 26424 | PyObject *capi_keywds, | |||
| 26425 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, double*,double*,F_INTint*,double*, F_INTint* )) { | |||
| 26426 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 26427 | volatile int f2py_success = 1; | |||
| 26428 | /*decl*/ | |||
| 26429 | ||||
| 26430 | int m = 0; | |||
| 26431 | int n = 0; | |||
| 26432 | double alpha = 0; | |||
| 26433 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 26434 | double *a = NULL((void*)0); | |||
| 26435 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 26436 | const int a_Rank = 2; | |||
| 26437 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 26438 | int capi_a_intent = 0; | |||
| 26439 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 26440 | double *b = NULL((void*)0); | |||
| 26441 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 26442 | const int b_Rank = 2; | |||
| 26443 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 26444 | int capi_b_intent = 0; | |||
| 26445 | int capi_overwrite_b = 0; | |||
| 26446 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 26447 | int lda = 0; | |||
| 26448 | int ldb = 0; | |||
| 26449 | int side = 0; | |||
| 26450 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 26451 | int lower = 0; | |||
| 26452 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 26453 | int trans_a = 0; | |||
| 26454 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 26455 | int diag = 0; | |||
| 26456 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 26457 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 26458 | ||||
| 26459 | /*routdebugenter*/ | |||
| 26460 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26461 | f2py_start_clock(); | |||
| 26462 | #endif | |||
| 26463 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 26464 | "OOO|OOOOi:_fblas.dtrsm",\ | |||
| 26465 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 26466 | return NULL((void*)0); | |||
| 26467 | /*frompyobj*/ | |||
| 26468 | /* Processing variable side */ | |||
| 26469 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 26470 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.dtrsm() 1st keyword (side) can't be converted to int"); | |||
| 26471 | if (f2py_success) { | |||
| 26472 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","dtrsm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26473 | /* Processing variable lower */ | |||
| 26474 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 26475 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.dtrsm() 2nd keyword (lower) can't be converted to int"); | |||
| 26476 | if (f2py_success) { | |||
| 26477 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","dtrsm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26478 | /* Processing variable trans_a */ | |||
| 26479 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 26480 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.dtrsm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 26481 | if (f2py_success) { | |||
| 26482 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","dtrsm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""dtrsm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 26483 | /* Processing variable diag */ | |||
| 26484 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 26485 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.dtrsm() 4th keyword (diag) can't be converted to int"); | |||
| 26486 | if (f2py_success) { | |||
| 26487 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","dtrsm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""dtrsm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26488 | /* Processing variable alpha */ | |||
| 26489 | f2py_success = double_from_pyobj(&alpha,alpha_capi,"_fblas.dtrsm() 1st argument (alpha) can't be converted to double"); | |||
| 26490 | if (f2py_success) { | |||
| 26491 | /* Processing variable b */ | |||
| 26492 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 26493 | ; | |||
| 26494 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 26495 | capi_b_tmp = array_from_pyobj(NPY_DOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 26496 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 26497 | if (!PyErr_Occurred()) | |||
| 26498 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.dtrsm to C/Fortran array" ); | |||
| 26499 | } else { | |||
| 26500 | b = (double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 26501 | ||||
| 26502 | /* Processing variable ldb */ | |||
| 26503 | ldb = MAX(shape(b, 0),1)((b_Dims[0] > 1) ? (b_Dims[0]) : (1)); | |||
| 26504 | /* Processing variable n */ | |||
| 26505 | n = shape(b, 1)b_Dims[1]; | |||
| 26506 | /* Processing variable m */ | |||
| 26507 | m = shape(b, 0)b_Dims[0]; | |||
| 26508 | /* Processing variable a */ | |||
| 26509 | ; | |||
| 26510 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 26511 | capi_a_tmp = array_from_pyobj(NPY_DOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 26512 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 26513 | if (!PyErr_Occurred()) | |||
| 26514 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.dtrsm to C/Fortran array" ); | |||
| 26515 | } else { | |||
| 26516 | a = (double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 26517 | ||||
| 26518 | CHECKARRAY(shape(a,0)==(side?n:m),"shape(a,0)==(side?n:m)","2nd argument a")if (!(a_Dims[0]==(side?n:m))) { PyErr_SetString(_fblas_error, "(""shape(a,0)==(side?n:m)"") failed for ""2nd argument a"); } else { | |||
| 26519 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 26520 | /* Processing variable lda */ | |||
| 26521 | lda = MAX(shape(a, 0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 26522 | /*end of frompyobj*/ | |||
| 26523 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26524 | f2py_start_call_clock(); | |||
| 26525 | #endif | |||
| 26526 | /*callfortranroutine*/ | |||
| 26527 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"), (trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 26528 | /*(*f2py_func)(&m,&n,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 26529 | if (PyErr_Occurred()) | |||
| 26530 | f2py_success = 0; | |||
| 26531 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26532 | f2py_stop_call_clock(); | |||
| 26533 | #endif | |||
| 26534 | /*end of callfortranroutine*/ | |||
| 26535 | if (f2py_success) { | |||
| 26536 | /*pyobjfrom*/ | |||
| 26537 | /*end of pyobjfrom*/ | |||
| 26538 | CFUNCSMESS("Building return value.\n"); | |||
| 26539 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 26540 | /*closepyobjfrom*/ | |||
| 26541 | /*end of closepyobjfrom*/ | |||
| 26542 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 26543 | /*cleanupfrompyobj*/ | |||
| 26544 | /* End of cleaning variable lda */ | |||
| 26545 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 26546 | } /*CHECKARRAY(shape(a,0)==(side?n:m))*/ | |||
| 26547 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 26548 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 26549 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 26550 | /* End of cleaning variable a */ | |||
| 26551 | /* End of cleaning variable m */ | |||
| 26552 | /* End of cleaning variable n */ | |||
| 26553 | /* End of cleaning variable ldb */ | |||
| 26554 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 26555 | /* End of cleaning variable b */ | |||
| 26556 | } /*if (f2py_success) of alpha*/ | |||
| 26557 | /* End of cleaning variable alpha */ | |||
| 26558 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 26559 | } /*if (f2py_success) of diag*/ | |||
| 26560 | /* End of cleaning variable diag */ | |||
| 26561 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 26562 | } /*if (f2py_success) of trans_a*/ | |||
| 26563 | /* End of cleaning variable trans_a */ | |||
| 26564 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 26565 | } /*if (f2py_success) of lower*/ | |||
| 26566 | /* End of cleaning variable lower */ | |||
| 26567 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 26568 | } /*if (f2py_success) of side*/ | |||
| 26569 | /* End of cleaning variable side */ | |||
| 26570 | /*end of cleanupfrompyobj*/ | |||
| 26571 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 26572 | /*routdebugfailure*/ | |||
| 26573 | } else { | |||
| 26574 | /*routdebugleave*/ | |||
| 26575 | } | |||
| 26576 | CFUNCSMESS("Freeing memory.\n"); | |||
| 26577 | /*freemem*/ | |||
| 26578 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26579 | f2py_stop_clock(); | |||
| 26580 | #endif | |||
| 26581 | return capi_buildvalue; | |||
| 26582 | } | |||
| 26583 | /******************************** end of dtrsm ********************************/ | |||
| 26584 | ||||
| 26585 | /*********************************** ctrsm ***********************************/ | |||
| 26586 | static char doc_f2py_rout__fblas_ctrsm[] = "\ | |||
| 26587 | x = ctrsm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``ctrsm``.\ | |||
| 26588 | \n\nParameters\n----------\n" | |||
| 26589 | "alpha : input complex\n" | |||
| 26590 | "a : input rank-2 array('F') with bounds (lda,*)\n" | |||
| 26591 | "b : input rank-2 array('F') with bounds (ldb,n)\n" | |||
| 26592 | "\nOther Parameters\n----------------\n" | |||
| 26593 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 26594 | "side : input int, optional\n Default: 0\n" | |||
| 26595 | "lower : input int, optional\n Default: 0\n" | |||
| 26596 | "trans_a : input int, optional\n Default: 0\n" | |||
| 26597 | "diag : input int, optional\n Default: 0\n" | |||
| 26598 | "\nReturns\n-------\n" | |||
| 26599 | "x : rank-2 array('F') with bounds (ldb,n) and b storage"; | |||
| 26600 | /* extern void F_FUNC(ctrsm,CTRSM)(char*, char*, char*, char*, F_INT*, F_INT*, complex_float*,complex_float*,F_INT*,complex_float*, F_INT* ); */ | |||
| 26601 | static PyObject *f2py_rout__fblas_ctrsm(const PyObject *capi_self, | |||
| 26602 | PyObject *capi_args, | |||
| 26603 | PyObject *capi_keywds, | |||
| 26604 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_float*,complex_float*,F_INTint*,complex_float*, F_INTint* )) { | |||
| 26605 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 26606 | volatile int f2py_success = 1; | |||
| 26607 | /*decl*/ | |||
| 26608 | ||||
| 26609 | int m = 0; | |||
| 26610 | int n = 0; | |||
| 26611 | complex_float alpha; | |||
| 26612 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 26613 | complex_float *a = NULL((void*)0); | |||
| 26614 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 26615 | const int a_Rank = 2; | |||
| 26616 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 26617 | int capi_a_intent = 0; | |||
| 26618 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 26619 | complex_float *b = NULL((void*)0); | |||
| 26620 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 26621 | const int b_Rank = 2; | |||
| 26622 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 26623 | int capi_b_intent = 0; | |||
| 26624 | int capi_overwrite_b = 0; | |||
| 26625 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 26626 | int lda = 0; | |||
| 26627 | int ldb = 0; | |||
| 26628 | int side = 0; | |||
| 26629 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 26630 | int lower = 0; | |||
| 26631 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 26632 | int trans_a = 0; | |||
| 26633 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 26634 | int diag = 0; | |||
| 26635 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 26636 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 26637 | ||||
| 26638 | /*routdebugenter*/ | |||
| 26639 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26640 | f2py_start_clock(); | |||
| 26641 | #endif | |||
| 26642 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 26643 | "OOO|OOOOi:_fblas.ctrsm",\ | |||
| 26644 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 26645 | return NULL((void*)0); | |||
| 26646 | /*frompyobj*/ | |||
| 26647 | /* Processing variable side */ | |||
| 26648 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 26649 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.ctrsm() 1st keyword (side) can't be converted to int"); | |||
| 26650 | if (f2py_success) { | |||
| 26651 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","ctrsm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26652 | /* Processing variable lower */ | |||
| 26653 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 26654 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ctrsm() 2nd keyword (lower) can't be converted to int"); | |||
| 26655 | if (f2py_success) { | |||
| 26656 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","ctrsm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26657 | /* Processing variable trans_a */ | |||
| 26658 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 26659 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.ctrsm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 26660 | if (f2py_success) { | |||
| 26661 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","ctrsm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ctrsm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 26662 | /* Processing variable diag */ | |||
| 26663 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 26664 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ctrsm() 4th keyword (diag) can't be converted to int"); | |||
| 26665 | if (f2py_success) { | |||
| 26666 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","ctrsm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ctrsm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26667 | /* Processing variable alpha */ | |||
| 26668 | f2py_success = complex_float_from_pyobj(&alpha,alpha_capi,"_fblas.ctrsm() 1st argument (alpha) can't be converted to complex_float"); | |||
| 26669 | if (f2py_success) { | |||
| 26670 | /* Processing variable b */ | |||
| 26671 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 26672 | ; | |||
| 26673 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 26674 | capi_b_tmp = array_from_pyobj(NPY_CFLOAT,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 26675 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 26676 | if (!PyErr_Occurred()) | |||
| 26677 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.ctrsm to C/Fortran array" ); | |||
| 26678 | } else { | |||
| 26679 | b = (complex_float *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 26680 | ||||
| 26681 | /* Processing variable ldb */ | |||
| 26682 | ldb = MAX(shape(b, 0),1)((b_Dims[0] > 1) ? (b_Dims[0]) : (1)); | |||
| 26683 | /* Processing variable n */ | |||
| 26684 | n = shape(b, 1)b_Dims[1]; | |||
| 26685 | /* Processing variable m */ | |||
| 26686 | m = shape(b, 0)b_Dims[0]; | |||
| 26687 | /* Processing variable a */ | |||
| 26688 | ; | |||
| 26689 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 26690 | capi_a_tmp = array_from_pyobj(NPY_CFLOAT,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 26691 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 26692 | if (!PyErr_Occurred()) | |||
| 26693 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ctrsm to C/Fortran array" ); | |||
| 26694 | } else { | |||
| 26695 | a = (complex_float *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 26696 | ||||
| 26697 | CHECKARRAY(shape(a,0)==(side?n:m),"shape(a,0)==(side?n:m)","2nd argument a")if (!(a_Dims[0]==(side?n:m))) { PyErr_SetString(_fblas_error, "(""shape(a,0)==(side?n:m)"") failed for ""2nd argument a"); } else { | |||
| 26698 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 26699 | /* Processing variable lda */ | |||
| 26700 | lda = MAX(shape(a, 0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 26701 | /*end of frompyobj*/ | |||
| 26702 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26703 | f2py_start_call_clock(); | |||
| 26704 | #endif | |||
| 26705 | /*callfortranroutine*/ | |||
| 26706 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"), (trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 26707 | /*(*f2py_func)(&m,&n,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 26708 | if (PyErr_Occurred()) | |||
| 26709 | f2py_success = 0; | |||
| 26710 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26711 | f2py_stop_call_clock(); | |||
| 26712 | #endif | |||
| 26713 | /*end of callfortranroutine*/ | |||
| 26714 | if (f2py_success) { | |||
| 26715 | /*pyobjfrom*/ | |||
| 26716 | /*end of pyobjfrom*/ | |||
| 26717 | CFUNCSMESS("Building return value.\n"); | |||
| 26718 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 26719 | /*closepyobjfrom*/ | |||
| 26720 | /*end of closepyobjfrom*/ | |||
| 26721 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 26722 | /*cleanupfrompyobj*/ | |||
| 26723 | /* End of cleaning variable lda */ | |||
| 26724 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 26725 | } /*CHECKARRAY(shape(a,0)==(side?n:m))*/ | |||
| 26726 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 26727 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 26728 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 26729 | /* End of cleaning variable a */ | |||
| 26730 | /* End of cleaning variable m */ | |||
| 26731 | /* End of cleaning variable n */ | |||
| 26732 | /* End of cleaning variable ldb */ | |||
| 26733 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 26734 | /* End of cleaning variable b */ | |||
| 26735 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 26736 | /* End of cleaning variable alpha */ | |||
| 26737 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 26738 | } /*if (f2py_success) of diag*/ | |||
| 26739 | /* End of cleaning variable diag */ | |||
| 26740 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 26741 | } /*if (f2py_success) of trans_a*/ | |||
| 26742 | /* End of cleaning variable trans_a */ | |||
| 26743 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 26744 | } /*if (f2py_success) of lower*/ | |||
| 26745 | /* End of cleaning variable lower */ | |||
| 26746 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 26747 | } /*if (f2py_success) of side*/ | |||
| 26748 | /* End of cleaning variable side */ | |||
| 26749 | /*end of cleanupfrompyobj*/ | |||
| 26750 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 26751 | /*routdebugfailure*/ | |||
| 26752 | } else { | |||
| 26753 | /*routdebugleave*/ | |||
| 26754 | } | |||
| 26755 | CFUNCSMESS("Freeing memory.\n"); | |||
| 26756 | /*freemem*/ | |||
| 26757 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26758 | f2py_stop_clock(); | |||
| 26759 | #endif | |||
| 26760 | return capi_buildvalue; | |||
| 26761 | } | |||
| 26762 | /******************************** end of ctrsm ********************************/ | |||
| 26763 | ||||
| 26764 | /*********************************** ztrsm ***********************************/ | |||
| 26765 | static char doc_f2py_rout__fblas_ztrsm[] = "\ | |||
| 26766 | x = ztrsm(alpha,a,b,[side,lower,trans_a,diag,overwrite_b])\n\nWrapper for ``ztrsm``.\ | |||
| 26767 | \n\nParameters\n----------\n" | |||
| 26768 | "alpha : input complex\n" | |||
| 26769 | "a : input rank-2 array('D') with bounds (lda,*)\n" | |||
| 26770 | "b : input rank-2 array('D') with bounds (ldb,n)\n" | |||
| 26771 | "\nOther Parameters\n----------------\n" | |||
| 26772 | "overwrite_b : input int, optional\n Default: 0\n" | |||
| 26773 | "side : input int, optional\n Default: 0\n" | |||
| 26774 | "lower : input int, optional\n Default: 0\n" | |||
| 26775 | "trans_a : input int, optional\n Default: 0\n" | |||
| 26776 | "diag : input int, optional\n Default: 0\n" | |||
| 26777 | "\nReturns\n-------\n" | |||
| 26778 | "x : rank-2 array('D') with bounds (ldb,n) and b storage"; | |||
| 26779 | /* extern void F_FUNC(ztrsm,ZTRSM)(char*, char*, char*, char*, F_INT*, F_INT*, complex_double*,complex_double*,F_INT*,complex_double*, F_INT* ); */ | |||
| 26780 | static PyObject *f2py_rout__fblas_ztrsm(const PyObject *capi_self, | |||
| 26781 | PyObject *capi_args, | |||
| 26782 | PyObject *capi_keywds, | |||
| 26783 | void (*f2py_func)(char*, char*, char*, char*, F_INTint*, F_INTint*, complex_double*,complex_double*,F_INTint*,complex_double*, F_INTint* )) { | |||
| 26784 | PyObject * volatile capi_buildvalue = NULL((void*)0); | |||
| 26785 | volatile int f2py_success = 1; | |||
| 26786 | /*decl*/ | |||
| 26787 | ||||
| 26788 | int m = 0; | |||
| 26789 | int n = 0; | |||
| 26790 | complex_double alpha; | |||
| 26791 | PyObject *alpha_capi = Py_None(&_Py_NoneStruct); | |||
| 26792 | complex_double *a = NULL((void*)0); | |||
| 26793 | npy_intp a_Dims[2] = {-1, -1}; | |||
| 26794 | const int a_Rank = 2; | |||
| 26795 | PyArrayObject *capi_a_tmp = NULL((void*)0); | |||
| 26796 | int capi_a_intent = 0; | |||
| 26797 | PyObject *a_capi = Py_None(&_Py_NoneStruct); | |||
| 26798 | complex_double *b = NULL((void*)0); | |||
| 26799 | npy_intp b_Dims[2] = {-1, -1}; | |||
| 26800 | const int b_Rank = 2; | |||
| 26801 | PyArrayObject *capi_b_tmp = NULL((void*)0); | |||
| 26802 | int capi_b_intent = 0; | |||
| 26803 | int capi_overwrite_b = 0; | |||
| 26804 | PyObject *b_capi = Py_None(&_Py_NoneStruct); | |||
| 26805 | int lda = 0; | |||
| 26806 | int ldb = 0; | |||
| 26807 | int side = 0; | |||
| 26808 | PyObject *side_capi = Py_None(&_Py_NoneStruct); | |||
| 26809 | int lower = 0; | |||
| 26810 | PyObject *lower_capi = Py_None(&_Py_NoneStruct); | |||
| 26811 | int trans_a = 0; | |||
| 26812 | PyObject *trans_a_capi = Py_None(&_Py_NoneStruct); | |||
| 26813 | int diag = 0; | |||
| 26814 | PyObject *diag_capi = Py_None(&_Py_NoneStruct); | |||
| 26815 | static char *capi_kwlist[] = {"alpha","a","b","side","lower","trans_a","diag","overwrite_b",NULL((void*)0)}; | |||
| 26816 | ||||
| 26817 | /*routdebugenter*/ | |||
| 26818 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26819 | f2py_start_clock(); | |||
| 26820 | #endif | |||
| 26821 | if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\ | |||
| 26822 | "OOO|OOOOi:_fblas.ztrsm",\ | |||
| 26823 | capi_kwlist,&alpha_capi,&a_capi,&b_capi,&side_capi,&lower_capi,&trans_a_capi,&diag_capi,&capi_overwrite_b)) | |||
| 26824 | return NULL((void*)0); | |||
| 26825 | /*frompyobj*/ | |||
| 26826 | /* Processing variable side */ | |||
| 26827 | if (side_capi == Py_None(&_Py_NoneStruct)) side = 0; else | |||
| 26828 | f2py_success = int_from_pyobj(&side,side_capi,"_fblas.ztrsm() 1st keyword (side) can't be converted to int"); | |||
| 26829 | if (f2py_success) { | |||
| 26830 | CHECKSCALAR(side==0 || side==1,"side==0 || side==1","1st keyword side","ztrsm:side=%d",side)if (!(side==0 || side==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsm:side=%d", "(""side==0 || side==1"") failed for " "1st keyword side", side); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26831 | /* Processing variable lower */ | |||
| 26832 | if (lower_capi == Py_None(&_Py_NoneStruct)) lower = 0; else | |||
| 26833 | f2py_success = int_from_pyobj(&lower,lower_capi,"_fblas.ztrsm() 2nd keyword (lower) can't be converted to int"); | |||
| 26834 | if (f2py_success) { | |||
| 26835 | CHECKSCALAR(lower==0 || lower==1,"lower==0 || lower==1","2nd keyword lower","ztrsm:lower=%d",lower)if (!(lower==0 || lower==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsm:lower=%d", "(""lower==0 || lower==1"") failed for " "2nd keyword lower", lower); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26836 | /* Processing variable trans_a */ | |||
| 26837 | if (trans_a_capi == Py_None(&_Py_NoneStruct)) trans_a = 0; else | |||
| 26838 | f2py_success = int_from_pyobj(&trans_a,trans_a_capi,"_fblas.ztrsm() 3rd keyword (trans_a) can't be converted to int"); | |||
| 26839 | if (f2py_success) { | |||
| 26840 | CHECKSCALAR(trans_a>=0 && trans_a <=2,"trans_a>=0 && trans_a <=2","3rd keyword trans_a","ztrsm:trans_a=%d",trans_a)if (!(trans_a>=0 && trans_a <=2)) { char errstring [256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1), "%s: ""ztrsm:trans_a=%d", "(""trans_a>=0 && trans_a <=2" ") failed for ""3rd keyword trans_a", trans_a); PyErr_SetString (_fblas_error,errstring); } else { | |||
| 26841 | /* Processing variable diag */ | |||
| 26842 | if (diag_capi == Py_None(&_Py_NoneStruct)) diag = 0; else | |||
| 26843 | f2py_success = int_from_pyobj(&diag,diag_capi,"_fblas.ztrsm() 4th keyword (diag) can't be converted to int"); | |||
| 26844 | if (f2py_success) { | |||
| 26845 | CHECKSCALAR(diag==0 || diag==1,"diag==0 || diag==1","4th keyword diag","ztrsm:diag=%d",diag)if (!(diag==0 || diag==1)) { char errstring[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1 ), "%s: ""ztrsm:diag=%d", "(""diag==0 || diag==1"") failed for " "4th keyword diag", diag); PyErr_SetString(_fblas_error,errstring ); } else { | |||
| 26846 | /* Processing variable alpha */ | |||
| 26847 | f2py_success = complex_double_from_pyobj(&alpha,alpha_capi,"_fblas.ztrsm() 1st argument (alpha) can't be converted to complex_double"); | |||
| 26848 | if (f2py_success) { | |||
| 26849 | /* Processing variable b */ | |||
| 26850 | capi_b_intent |= (capi_overwrite_b?0:F2PY_INTENT_COPY32); | |||
| 26851 | ; | |||
| 26852 | capi_b_intent |= F2PY_INTENT_IN1|F2PY_INTENT_OUT4; | |||
| 26853 | capi_b_tmp = array_from_pyobj(NPY_CDOUBLE,b_Dims,b_Rank,capi_b_intent,b_capi); | |||
| 26854 | if (capi_b_tmp == NULL((void*)0)) { | |||
| 26855 | if (!PyErr_Occurred()) | |||
| 26856 | PyErr_SetString(_fblas_error,"failed in converting 3rd argument `b' of _fblas.ztrsm to C/Fortran array" ); | |||
| 26857 | } else { | |||
| 26858 | b = (complex_double *)(PyArray_DATA(capi_b_tmp)((void *)((PyArrayObject_fields *)(capi_b_tmp))->data)); | |||
| 26859 | ||||
| 26860 | /* Processing variable ldb */ | |||
| 26861 | ldb = MAX(shape(b, 0),1)((b_Dims[0] > 1) ? (b_Dims[0]) : (1)); | |||
| 26862 | /* Processing variable n */ | |||
| 26863 | n = shape(b, 1)b_Dims[1]; | |||
| 26864 | /* Processing variable m */ | |||
| 26865 | m = shape(b, 0)b_Dims[0]; | |||
| 26866 | /* Processing variable a */ | |||
| 26867 | ; | |||
| 26868 | capi_a_intent |= F2PY_INTENT_IN1; | |||
| 26869 | capi_a_tmp = array_from_pyobj(NPY_CDOUBLE,a_Dims,a_Rank,capi_a_intent,a_capi); | |||
| 26870 | if (capi_a_tmp == NULL((void*)0)) { | |||
| 26871 | if (!PyErr_Occurred()) | |||
| 26872 | PyErr_SetString(_fblas_error,"failed in converting 2nd argument `a' of _fblas.ztrsm to C/Fortran array" ); | |||
| 26873 | } else { | |||
| 26874 | a = (complex_double *)(PyArray_DATA(capi_a_tmp)((void *)((PyArrayObject_fields *)(capi_a_tmp))->data)); | |||
| 26875 | ||||
| 26876 | CHECKARRAY(shape(a,0)==(side?n:m),"shape(a,0)==(side?n:m)","2nd argument a")if (!(a_Dims[0]==(side?n:m))) { PyErr_SetString(_fblas_error, "(""shape(a,0)==(side?n:m)"") failed for ""2nd argument a"); } else { | |||
| 26877 | CHECKARRAY(shape(a,0)==shape(a,1),"shape(a,0)==shape(a,1)","2nd argument a")if (!(a_Dims[0]==a_Dims[1])) { PyErr_SetString(_fblas_error,"(" "shape(a,0)==shape(a,1)"") failed for ""2nd argument a"); } else { | |||
| 26878 | /* Processing variable lda */ | |||
| 26879 | lda = MAX(shape(a, 0),1)((a_Dims[0] > 1) ? (a_Dims[0]) : (1)); | |||
| 26880 | /*end of frompyobj*/ | |||
| 26881 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26882 | f2py_start_call_clock(); | |||
| 26883 | #endif | |||
| 26884 | /*callfortranroutine*/ | |||
| 26885 | (*f2py_func)((side?"R":"L"), (lower?"L":"U"), (trans_a?(trans_a==2?"C":"T"):"N"), (diag?"U":"N"), &m, &n, &alpha, a, &lda, b, &ldb) ; | |||
| 26886 | /*(*f2py_func)(&m,&n,&alpha,a,b,&lda,&ldb,&side,&lower,&trans_a,&diag);*/ | |||
| 26887 | if (PyErr_Occurred()) | |||
| 26888 | f2py_success = 0; | |||
| 26889 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26890 | f2py_stop_call_clock(); | |||
| 26891 | #endif | |||
| 26892 | /*end of callfortranroutine*/ | |||
| 26893 | if (f2py_success) { | |||
| 26894 | /*pyobjfrom*/ | |||
| 26895 | /*end of pyobjfrom*/ | |||
| 26896 | CFUNCSMESS("Building return value.\n"); | |||
| 26897 | capi_buildvalue = Py_BuildValue("N",capi_b_tmp); | |||
| 26898 | /*closepyobjfrom*/ | |||
| 26899 | /*end of closepyobjfrom*/ | |||
| 26900 | } /*if (f2py_success) after callfortranroutine*/ | |||
| 26901 | /*cleanupfrompyobj*/ | |||
| 26902 | /* End of cleaning variable lda */ | |||
| 26903 | } /*CHECKARRAY(shape(a,0)==shape(a,1))*/ | |||
| 26904 | } /*CHECKARRAY(shape(a,0)==(side?n:m))*/ | |||
| 26905 | if((PyObject *)capi_a_tmp!=a_capi) { | |||
| 26906 | Py_XDECREF(capi_a_tmp)_Py_XDECREF(((PyObject*)(capi_a_tmp))); } | |||
| 26907 | } /*if (capi_a_tmp == NULL) ... else of a*/ | |||
| 26908 | /* End of cleaning variable a */ | |||
| 26909 | /* End of cleaning variable m */ | |||
| 26910 | /* End of cleaning variable n */ | |||
| 26911 | /* End of cleaning variable ldb */ | |||
| 26912 | } /*if (capi_b_tmp == NULL) ... else of b*/ | |||
| 26913 | /* End of cleaning variable b */ | |||
| 26914 | } /*if (f2py_success) of alpha frompyobj*/ | |||
| 26915 | /* End of cleaning variable alpha */ | |||
| 26916 | } /*CHECKSCALAR(diag==0 || diag==1)*/ | |||
| 26917 | } /*if (f2py_success) of diag*/ | |||
| 26918 | /* End of cleaning variable diag */ | |||
| 26919 | } /*CHECKSCALAR(trans_a>=0 && trans_a <=2)*/ | |||
| 26920 | } /*if (f2py_success) of trans_a*/ | |||
| 26921 | /* End of cleaning variable trans_a */ | |||
| 26922 | } /*CHECKSCALAR(lower==0 || lower==1)*/ | |||
| 26923 | } /*if (f2py_success) of lower*/ | |||
| 26924 | /* End of cleaning variable lower */ | |||
| 26925 | } /*CHECKSCALAR(side==0 || side==1)*/ | |||
| 26926 | } /*if (f2py_success) of side*/ | |||
| 26927 | /* End of cleaning variable side */ | |||
| 26928 | /*end of cleanupfrompyobj*/ | |||
| 26929 | if (capi_buildvalue == NULL((void*)0)) { | |||
| 26930 | /*routdebugfailure*/ | |||
| 26931 | } else { | |||
| 26932 | /*routdebugleave*/ | |||
| 26933 | } | |||
| 26934 | CFUNCSMESS("Freeing memory.\n"); | |||
| 26935 | /*freemem*/ | |||
| 26936 | #ifdef F2PY_REPORT_ATEXIT | |||
| 26937 | f2py_stop_clock(); | |||
| 26938 | #endif | |||
| 26939 | return capi_buildvalue; | |||
| 26940 | } | |||
| 26941 | /******************************** end of ztrsm ********************************/ | |||
| 26942 | /*eof body*/ | |||
| 26943 | ||||
| 26944 | /******************* See f2py2e/f90mod_rules.py: buildhooks *******************/ | |||
| 26945 | /*need_f90modhooks*/ | |||
| 26946 | ||||
| 26947 | /************** See f2py2e/rules.py: module_rules['modulebody'] **************/ | |||
| 26948 | ||||
| 26949 | /******************* See f2py2e/common_rules.py: buildhooks *******************/ | |||
| 26950 | ||||
| 26951 | /*need_commonhooks*/ | |||
| 26952 | ||||
| 26953 | /**************************** See f2py2e/rules.py ****************************/ | |||
| 26954 | ||||
| 26955 | static FortranDataDef f2py_routine_defs[] = { | |||
| 26956 | {"srotg",-1,{{-1}},0,(char *)F_FUNC(srotg,SROTG)srotg_,(f2py_init_func)f2py_rout__fblas_srotg,doc_f2py_rout__fblas_srotg}, | |||
| 26957 | {"drotg",-1,{{-1}},0,(char *)F_FUNC(drotg,DROTG)drotg_,(f2py_init_func)f2py_rout__fblas_drotg,doc_f2py_rout__fblas_drotg}, | |||
| 26958 | {"crotg",-1,{{-1}},0,(char *)F_FUNC(crotg,CROTG)crotg_,(f2py_init_func)f2py_rout__fblas_crotg,doc_f2py_rout__fblas_crotg}, | |||
| 26959 | {"zrotg",-1,{{-1}},0,(char *)F_FUNC(zrotg,ZROTG)zrotg_,(f2py_init_func)f2py_rout__fblas_zrotg,doc_f2py_rout__fblas_zrotg}, | |||
| 26960 | {"srotmg",-1,{{-1}},0,(char *)F_FUNC(srotmg,SROTMG)srotmg_,(f2py_init_func)f2py_rout__fblas_srotmg,doc_f2py_rout__fblas_srotmg}, | |||
| 26961 | {"drotmg",-1,{{-1}},0,(char *)F_FUNC(drotmg,DROTMG)drotmg_,(f2py_init_func)f2py_rout__fblas_drotmg,doc_f2py_rout__fblas_drotmg}, | |||
| 26962 | {"srot",-1,{{-1}},0,(char *)F_FUNC(srot,SROT)srot_,(f2py_init_func)f2py_rout__fblas_srot,doc_f2py_rout__fblas_srot}, | |||
| 26963 | {"drot",-1,{{-1}},0,(char *)F_FUNC(drot,DROT)drot_,(f2py_init_func)f2py_rout__fblas_drot,doc_f2py_rout__fblas_drot}, | |||
| 26964 | {"csrot",-1,{{-1}},0,(char *)F_FUNC(csrot,CSROT)csrot_,(f2py_init_func)f2py_rout__fblas_csrot,doc_f2py_rout__fblas_csrot}, | |||
| 26965 | {"zdrot",-1,{{-1}},0,(char *)F_FUNC(zdrot,ZDROT)zdrot_,(f2py_init_func)f2py_rout__fblas_zdrot,doc_f2py_rout__fblas_zdrot}, | |||
| 26966 | {"srotm",-1,{{-1}},0,(char *)F_FUNC(srotm,SROTM)srotm_,(f2py_init_func)f2py_rout__fblas_srotm,doc_f2py_rout__fblas_srotm}, | |||
| 26967 | {"drotm",-1,{{-1}},0,(char *)F_FUNC(drotm,DROTM)drotm_,(f2py_init_func)f2py_rout__fblas_drotm,doc_f2py_rout__fblas_drotm}, | |||
| 26968 | {"sswap",-1,{{-1}},0,(char *)F_FUNC(sswap,SSWAP)sswap_,(f2py_init_func)f2py_rout__fblas_sswap,doc_f2py_rout__fblas_sswap}, | |||
| 26969 | {"dswap",-1,{{-1}},0,(char *)F_FUNC(dswap,DSWAP)dswap_,(f2py_init_func)f2py_rout__fblas_dswap,doc_f2py_rout__fblas_dswap}, | |||
| 26970 | {"cswap",-1,{{-1}},0,(char *)F_FUNC(cswap,CSWAP)cswap_,(f2py_init_func)f2py_rout__fblas_cswap,doc_f2py_rout__fblas_cswap}, | |||
| 26971 | {"zswap",-1,{{-1}},0,(char *)F_FUNC(zswap,ZSWAP)zswap_,(f2py_init_func)f2py_rout__fblas_zswap,doc_f2py_rout__fblas_zswap}, | |||
| 26972 | {"sscal",-1,{{-1}},0,(char *)F_FUNC(sscal,SSCAL)sscal_,(f2py_init_func)f2py_rout__fblas_sscal,doc_f2py_rout__fblas_sscal}, | |||
| 26973 | {"dscal",-1,{{-1}},0,(char *)F_FUNC(dscal,DSCAL)dscal_,(f2py_init_func)f2py_rout__fblas_dscal,doc_f2py_rout__fblas_dscal}, | |||
| 26974 | {"cscal",-1,{{-1}},0,(char *)F_FUNC(cscal,CSCAL)cscal_,(f2py_init_func)f2py_rout__fblas_cscal,doc_f2py_rout__fblas_cscal}, | |||
| 26975 | {"zscal",-1,{{-1}},0,(char *)F_FUNC(zscal,ZSCAL)zscal_,(f2py_init_func)f2py_rout__fblas_zscal,doc_f2py_rout__fblas_zscal}, | |||
| 26976 | {"csscal",-1,{{-1}},0,(char *)F_FUNC(csscal,CSSCAL)csscal_,(f2py_init_func)f2py_rout__fblas_csscal,doc_f2py_rout__fblas_csscal}, | |||
| 26977 | {"zdscal",-1,{{-1}},0,(char *)F_FUNC(zdscal,ZDSCAL)zdscal_,(f2py_init_func)f2py_rout__fblas_zdscal,doc_f2py_rout__fblas_zdscal}, | |||
| 26978 | {"scopy",-1,{{-1}},0,(char *)F_FUNC(scopy,SCOPY)scopy_,(f2py_init_func)f2py_rout__fblas_scopy,doc_f2py_rout__fblas_scopy}, | |||
| 26979 | {"dcopy",-1,{{-1}},0,(char *)F_FUNC(dcopy,DCOPY)dcopy_,(f2py_init_func)f2py_rout__fblas_dcopy,doc_f2py_rout__fblas_dcopy}, | |||
| 26980 | {"ccopy",-1,{{-1}},0,(char *)F_FUNC(ccopy,CCOPY)ccopy_,(f2py_init_func)f2py_rout__fblas_ccopy,doc_f2py_rout__fblas_ccopy}, | |||
| 26981 | {"zcopy",-1,{{-1}},0,(char *)F_FUNC(zcopy,ZCOPY)zcopy_,(f2py_init_func)f2py_rout__fblas_zcopy,doc_f2py_rout__fblas_zcopy}, | |||
| 26982 | {"saxpy",-1,{{-1}},0,(char *)F_FUNC(saxpy,SAXPY)saxpy_,(f2py_init_func)f2py_rout__fblas_saxpy,doc_f2py_rout__fblas_saxpy}, | |||
| 26983 | {"daxpy",-1,{{-1}},0,(char *)F_FUNC(daxpy,DAXPY)daxpy_,(f2py_init_func)f2py_rout__fblas_daxpy,doc_f2py_rout__fblas_daxpy}, | |||
| 26984 | {"caxpy",-1,{{-1}},0,(char *)F_FUNC(caxpy,CAXPY)caxpy_,(f2py_init_func)f2py_rout__fblas_caxpy,doc_f2py_rout__fblas_caxpy}, | |||
| 26985 | {"zaxpy",-1,{{-1}},0,(char *)F_FUNC(zaxpy,ZAXPY)zaxpy_,(f2py_init_func)f2py_rout__fblas_zaxpy,doc_f2py_rout__fblas_zaxpy}, | |||
| 26986 | {"sdot",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(sdot,SDOT)f2pywrapsdot_,(f2py_init_func)f2py_rout__fblas_sdot,doc_f2py_rout__fblas_sdot}, | |||
| 26987 | {"ddot",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(ddot,DDOT)f2pywrapddot_,(f2py_init_func)f2py_rout__fblas_ddot,doc_f2py_rout__fblas_ddot}, | |||
| 26988 | {"cdotu",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(cdotu,CDOTU)f2pywrapcdotu_,(f2py_init_func)f2py_rout__fblas_cdotu,doc_f2py_rout__fblas_cdotu}, | |||
| 26989 | {"zdotu",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(zdotu,ZDOTU)f2pywrapzdotu_,(f2py_init_func)f2py_rout__fblas_zdotu,doc_f2py_rout__fblas_zdotu}, | |||
| 26990 | {"cdotc",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(cdotc,CDOTC)f2pywrapcdotc_,(f2py_init_func)f2py_rout__fblas_cdotc,doc_f2py_rout__fblas_cdotc}, | |||
| 26991 | {"zdotc",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(zdotc,ZDOTC)f2pywrapzdotc_,(f2py_init_func)f2py_rout__fblas_zdotc,doc_f2py_rout__fblas_zdotc}, | |||
| 26992 | {"snrm2",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(snrm2,SNRM2)f2pywrapsnrm2_,(f2py_init_func)f2py_rout__fblas_snrm2,doc_f2py_rout__fblas_snrm2}, | |||
| 26993 | {"scnrm2",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(scnrm2,SCNRM2)f2pywrapscnrm2_,(f2py_init_func)f2py_rout__fblas_scnrm2,doc_f2py_rout__fblas_scnrm2}, | |||
| 26994 | {"dnrm2",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(dnrm2,DNRM2)f2pywrapdnrm2_,(f2py_init_func)f2py_rout__fblas_dnrm2,doc_f2py_rout__fblas_dnrm2}, | |||
| 26995 | {"dznrm2",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(dznrm2,DZNRM2)f2pywrapdznrm2_,(f2py_init_func)f2py_rout__fblas_dznrm2,doc_f2py_rout__fblas_dznrm2}, | |||
| 26996 | {"sasum",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(sasum,SASUM)f2pywrapsasum_,(f2py_init_func)f2py_rout__fblas_sasum,doc_f2py_rout__fblas_sasum}, | |||
| 26997 | {"scasum",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(scasum,SCASUM)f2pywrapscasum_,(f2py_init_func)f2py_rout__fblas_scasum,doc_f2py_rout__fblas_scasum}, | |||
| 26998 | {"dasum",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(dasum,DASUM)f2pywrapdasum_,(f2py_init_func)f2py_rout__fblas_dasum,doc_f2py_rout__fblas_dasum}, | |||
| 26999 | {"dzasum",-1,{{-1}},0,(char *)F_WRAPPEDFUNC(dzasum,DZASUM)f2pywrapdzasum_,(f2py_init_func)f2py_rout__fblas_dzasum,doc_f2py_rout__fblas_dzasum}, | |||
| 27000 | {"isamax",-1,{{-1}},0,(char *)F_FUNC(isamax,ISAMAX)isamax_ ,(f2py_init_func)f2py_rout__fblas_isamax,doc_f2py_rout__fblas_isamax}, | |||
| 27001 | {"idamax",-1,{{-1}},0,(char *)F_FUNC(idamax,IDAMAX)idamax_ ,(f2py_init_func)f2py_rout__fblas_idamax,doc_f2py_rout__fblas_idamax}, | |||
| 27002 | {"icamax",-1,{{-1}},0,(char *)F_FUNC(icamax,ICAMAX)icamax_ ,(f2py_init_func)f2py_rout__fblas_icamax,doc_f2py_rout__fblas_icamax}, | |||
| 27003 | {"izamax",-1,{{-1}},0,(char *)F_FUNC(izamax,IZAMAX)izamax_ ,(f2py_init_func)f2py_rout__fblas_izamax,doc_f2py_rout__fblas_izamax}, | |||
| 27004 | {"sgemv",-1,{{-1}},0,(char *)F_FUNC(sgemv,SGEMV)sgemv_,(f2py_init_func)f2py_rout__fblas_sgemv,doc_f2py_rout__fblas_sgemv}, | |||
| 27005 | {"dgemv",-1,{{-1}},0,(char *)F_FUNC(dgemv,DGEMV)dgemv_,(f2py_init_func)f2py_rout__fblas_dgemv,doc_f2py_rout__fblas_dgemv}, | |||
| 27006 | {"cgemv",-1,{{-1}},0,(char *)F_FUNC(cgemv,CGEMV)cgemv_,(f2py_init_func)f2py_rout__fblas_cgemv,doc_f2py_rout__fblas_cgemv}, | |||
| 27007 | {"zgemv",-1,{{-1}},0,(char *)F_FUNC(zgemv,ZGEMV)zgemv_,(f2py_init_func)f2py_rout__fblas_zgemv,doc_f2py_rout__fblas_zgemv}, | |||
| 27008 | {"sgbmv",-1,{{-1}},0,(char *)F_FUNC(sgbmv,SGBMV)sgbmv_,(f2py_init_func)f2py_rout__fblas_sgbmv,doc_f2py_rout__fblas_sgbmv}, | |||
| 27009 | {"dgbmv",-1,{{-1}},0,(char *)F_FUNC(dgbmv,DGBMV)dgbmv_,(f2py_init_func)f2py_rout__fblas_dgbmv,doc_f2py_rout__fblas_dgbmv}, | |||
| 27010 | {"cgbmv",-1,{{-1}},0,(char *)F_FUNC(cgbmv,CGBMV)cgbmv_,(f2py_init_func)f2py_rout__fblas_cgbmv,doc_f2py_rout__fblas_cgbmv}, | |||
| 27011 | {"zgbmv",-1,{{-1}},0,(char *)F_FUNC(zgbmv,ZGBMV)zgbmv_,(f2py_init_func)f2py_rout__fblas_zgbmv,doc_f2py_rout__fblas_zgbmv}, | |||
| 27012 | {"ssbmv",-1,{{-1}},0,(char *)F_FUNC(ssbmv,SSBMV)ssbmv_,(f2py_init_func)f2py_rout__fblas_ssbmv,doc_f2py_rout__fblas_ssbmv}, | |||
| 27013 | {"dsbmv",-1,{{-1}},0,(char *)F_FUNC(dsbmv,DSBMV)dsbmv_,(f2py_init_func)f2py_rout__fblas_dsbmv,doc_f2py_rout__fblas_dsbmv}, | |||
| 27014 | {"chbmv",-1,{{-1}},0,(char *)F_FUNC(chbmv,CHBMV)chbmv_,(f2py_init_func)f2py_rout__fblas_chbmv,doc_f2py_rout__fblas_chbmv}, | |||
| 27015 | {"zhbmv",-1,{{-1}},0,(char *)F_FUNC(zhbmv,ZHBMV)zhbmv_,(f2py_init_func)f2py_rout__fblas_zhbmv,doc_f2py_rout__fblas_zhbmv}, | |||
| 27016 | {"sspmv",-1,{{-1}},0,(char *)F_FUNC(sspmv,SSPMV)sspmv_,(f2py_init_func)f2py_rout__fblas_sspmv,doc_f2py_rout__fblas_sspmv}, | |||
| 27017 | {"dspmv",-1,{{-1}},0,(char *)F_FUNC(dspmv,DSPMV)dspmv_,(f2py_init_func)f2py_rout__fblas_dspmv,doc_f2py_rout__fblas_dspmv}, | |||
| 27018 | {"cspmv",-1,{{-1}},0,(char *)F_FUNC(cspmv,CSPMV)cspmv_,(f2py_init_func)f2py_rout__fblas_cspmv,doc_f2py_rout__fblas_cspmv}, | |||
| 27019 | {"zspmv",-1,{{-1}},0,(char *)F_FUNC(zspmv,ZSPMV)zspmv_,(f2py_init_func)f2py_rout__fblas_zspmv,doc_f2py_rout__fblas_zspmv}, | |||
| 27020 | {"chpmv",-1,{{-1}},0,(char *)F_FUNC(chpmv,CHPMV)chpmv_,(f2py_init_func)f2py_rout__fblas_chpmv,doc_f2py_rout__fblas_chpmv}, | |||
| 27021 | {"zhpmv",-1,{{-1}},0,(char *)F_FUNC(zhpmv,ZHPMV)zhpmv_,(f2py_init_func)f2py_rout__fblas_zhpmv,doc_f2py_rout__fblas_zhpmv}, | |||
| 27022 | {"ssymv",-1,{{-1}},0,(char *)F_FUNC(ssymv,SSYMV)ssymv_,(f2py_init_func)f2py_rout__fblas_ssymv,doc_f2py_rout__fblas_ssymv}, | |||
| 27023 | {"dsymv",-1,{{-1}},0,(char *)F_FUNC(dsymv,DSYMV)dsymv_,(f2py_init_func)f2py_rout__fblas_dsymv,doc_f2py_rout__fblas_dsymv}, | |||
| 27024 | {"chemv",-1,{{-1}},0,(char *)F_FUNC(chemv,CHEMV)chemv_,(f2py_init_func)f2py_rout__fblas_chemv,doc_f2py_rout__fblas_chemv}, | |||
| 27025 | {"zhemv",-1,{{-1}},0,(char *)F_FUNC(zhemv,ZHEMV)zhemv_,(f2py_init_func)f2py_rout__fblas_zhemv,doc_f2py_rout__fblas_zhemv}, | |||
| 27026 | {"sger",-1,{{-1}},0,(char *)F_FUNC(sger,SGER)sger_,(f2py_init_func)f2py_rout__fblas_sger,doc_f2py_rout__fblas_sger}, | |||
| 27027 | {"dger",-1,{{-1}},0,(char *)F_FUNC(dger,DGER)dger_,(f2py_init_func)f2py_rout__fblas_dger,doc_f2py_rout__fblas_dger}, | |||
| 27028 | {"cgeru",-1,{{-1}},0,(char *)F_FUNC(cgeru,CGERU)cgeru_,(f2py_init_func)f2py_rout__fblas_cgeru,doc_f2py_rout__fblas_cgeru}, | |||
| 27029 | {"zgeru",-1,{{-1}},0,(char *)F_FUNC(zgeru,ZGERU)zgeru_,(f2py_init_func)f2py_rout__fblas_zgeru,doc_f2py_rout__fblas_zgeru}, | |||
| 27030 | {"cgerc",-1,{{-1}},0,(char *)F_FUNC(cgerc,CGERC)cgerc_,(f2py_init_func)f2py_rout__fblas_cgerc,doc_f2py_rout__fblas_cgerc}, | |||
| 27031 | {"zgerc",-1,{{-1}},0,(char *)F_FUNC(zgerc,ZGERC)zgerc_,(f2py_init_func)f2py_rout__fblas_zgerc,doc_f2py_rout__fblas_zgerc}, | |||
| 27032 | {"ssyr",-1,{{-1}},0,(char *)F_FUNC(ssyr,SSYR)ssyr_,(f2py_init_func)f2py_rout__fblas_ssyr,doc_f2py_rout__fblas_ssyr}, | |||
| 27033 | {"dsyr",-1,{{-1}},0,(char *)F_FUNC(dsyr,DSYR)dsyr_,(f2py_init_func)f2py_rout__fblas_dsyr,doc_f2py_rout__fblas_dsyr}, | |||
| 27034 | {"csyr",-1,{{-1}},0,(char *)F_FUNC(csyr,CSYR)csyr_,(f2py_init_func)f2py_rout__fblas_csyr,doc_f2py_rout__fblas_csyr}, | |||
| 27035 | {"zsyr",-1,{{-1}},0,(char *)F_FUNC(zsyr,ZSYR)zsyr_,(f2py_init_func)f2py_rout__fblas_zsyr,doc_f2py_rout__fblas_zsyr}, | |||
| 27036 | {"cher",-1,{{-1}},0,(char *)F_FUNC(cher,CHER)cher_,(f2py_init_func)f2py_rout__fblas_cher,doc_f2py_rout__fblas_cher}, | |||
| 27037 | {"zher",-1,{{-1}},0,(char *)F_FUNC(zher,ZHER)zher_,(f2py_init_func)f2py_rout__fblas_zher,doc_f2py_rout__fblas_zher}, | |||
| 27038 | {"ssyr2",-1,{{-1}},0,(char *)F_FUNC(ssyr2,SSYR2)ssyr2_,(f2py_init_func)f2py_rout__fblas_ssyr2,doc_f2py_rout__fblas_ssyr2}, | |||
| 27039 | {"dsyr2",-1,{{-1}},0,(char *)F_FUNC(dsyr2,DSYR2)dsyr2_,(f2py_init_func)f2py_rout__fblas_dsyr2,doc_f2py_rout__fblas_dsyr2}, | |||
| 27040 | {"cher2",-1,{{-1}},0,(char *)F_FUNC(cher2,CHER2)cher2_,(f2py_init_func)f2py_rout__fblas_cher2,doc_f2py_rout__fblas_cher2}, | |||
| 27041 | {"zher2",-1,{{-1}},0,(char *)F_FUNC(zher2,ZHER2)zher2_,(f2py_init_func)f2py_rout__fblas_zher2,doc_f2py_rout__fblas_zher2}, | |||
| 27042 | {"sspr",-1,{{-1}},0,(char *)F_FUNC(sspr,SSPR)sspr_,(f2py_init_func)f2py_rout__fblas_sspr,doc_f2py_rout__fblas_sspr}, | |||
| 27043 | {"dspr",-1,{{-1}},0,(char *)F_FUNC(dspr,DSPR)dspr_,(f2py_init_func)f2py_rout__fblas_dspr,doc_f2py_rout__fblas_dspr}, | |||
| 27044 | {"cspr",-1,{{-1}},0,(char *)F_FUNC(cspr,CSPR)cspr_,(f2py_init_func)f2py_rout__fblas_cspr,doc_f2py_rout__fblas_cspr}, | |||
| 27045 | {"zspr",-1,{{-1}},0,(char *)F_FUNC(zspr,ZSPR)zspr_,(f2py_init_func)f2py_rout__fblas_zspr,doc_f2py_rout__fblas_zspr}, | |||
| 27046 | {"chpr",-1,{{-1}},0,(char *)F_FUNC(chpr,CHPR)chpr_,(f2py_init_func)f2py_rout__fblas_chpr,doc_f2py_rout__fblas_chpr}, | |||
| 27047 | {"zhpr",-1,{{-1}},0,(char *)F_FUNC(zhpr,ZHPR)zhpr_,(f2py_init_func)f2py_rout__fblas_zhpr,doc_f2py_rout__fblas_zhpr}, | |||
| 27048 | {"sspr2",-1,{{-1}},0,(char *)F_FUNC(sspr2,SSPR2)sspr2_,(f2py_init_func)f2py_rout__fblas_sspr2,doc_f2py_rout__fblas_sspr2}, | |||
| 27049 | {"dspr2",-1,{{-1}},0,(char *)F_FUNC(dspr2,DSPR2)dspr2_,(f2py_init_func)f2py_rout__fblas_dspr2,doc_f2py_rout__fblas_dspr2}, | |||
| 27050 | {"chpr2",-1,{{-1}},0,(char *)F_FUNC(chpr2,CHPR2)chpr2_,(f2py_init_func)f2py_rout__fblas_chpr2,doc_f2py_rout__fblas_chpr2}, | |||
| 27051 | {"zhpr2",-1,{{-1}},0,(char *)F_FUNC(zhpr2,ZHPR2)zhpr2_,(f2py_init_func)f2py_rout__fblas_zhpr2,doc_f2py_rout__fblas_zhpr2}, | |||
| 27052 | {"stbsv",-1,{{-1}},0,(char *)F_FUNC(stbsv,STBSV)stbsv_,(f2py_init_func)f2py_rout__fblas_stbsv,doc_f2py_rout__fblas_stbsv}, | |||
| 27053 | {"dtbsv",-1,{{-1}},0,(char *)F_FUNC(dtbsv,DTBSV)dtbsv_,(f2py_init_func)f2py_rout__fblas_dtbsv,doc_f2py_rout__fblas_dtbsv}, | |||
| 27054 | {"ctbsv",-1,{{-1}},0,(char *)F_FUNC(ctbsv,CTBSV)ctbsv_,(f2py_init_func)f2py_rout__fblas_ctbsv,doc_f2py_rout__fblas_ctbsv}, | |||
| 27055 | {"ztbsv",-1,{{-1}},0,(char *)F_FUNC(ztbsv,ZTBSV)ztbsv_,(f2py_init_func)f2py_rout__fblas_ztbsv,doc_f2py_rout__fblas_ztbsv}, | |||
| 27056 | {"stpsv",-1,{{-1}},0,(char *)F_FUNC(stpsv,STPSV)stpsv_,(f2py_init_func)f2py_rout__fblas_stpsv,doc_f2py_rout__fblas_stpsv}, | |||
| 27057 | {"dtpsv",-1,{{-1}},0,(char *)F_FUNC(dtpsv,DTPSV)dtpsv_,(f2py_init_func)f2py_rout__fblas_dtpsv,doc_f2py_rout__fblas_dtpsv}, | |||
| 27058 | {"ctpsv",-1,{{-1}},0,(char *)F_FUNC(ctpsv,CTPSV)ctpsv_,(f2py_init_func)f2py_rout__fblas_ctpsv,doc_f2py_rout__fblas_ctpsv}, | |||
| 27059 | {"ztpsv",-1,{{-1}},0,(char *)F_FUNC(ztpsv,ZTPSV)ztpsv_,(f2py_init_func)f2py_rout__fblas_ztpsv,doc_f2py_rout__fblas_ztpsv}, | |||
| 27060 | {"strmv",-1,{{-1}},0,(char *)F_FUNC(strmv,STRMV)strmv_,(f2py_init_func)f2py_rout__fblas_strmv,doc_f2py_rout__fblas_strmv}, | |||
| 27061 | {"dtrmv",-1,{{-1}},0,(char *)F_FUNC(dtrmv,DTRMV)dtrmv_,(f2py_init_func)f2py_rout__fblas_dtrmv,doc_f2py_rout__fblas_dtrmv}, | |||
| 27062 | {"ctrmv",-1,{{-1}},0,(char *)F_FUNC(ctrmv,CTRMV)ctrmv_,(f2py_init_func)f2py_rout__fblas_ctrmv,doc_f2py_rout__fblas_ctrmv}, | |||
| 27063 | {"ztrmv",-1,{{-1}},0,(char *)F_FUNC(ztrmv,ZTRMV)ztrmv_,(f2py_init_func)f2py_rout__fblas_ztrmv,doc_f2py_rout__fblas_ztrmv}, | |||
| 27064 | {"strsv",-1,{{-1}},0,(char *)F_FUNC(strsv,STRSV)strsv_,(f2py_init_func)f2py_rout__fblas_strsv,doc_f2py_rout__fblas_strsv}, | |||
| 27065 | {"dtrsv",-1,{{-1}},0,(char *)F_FUNC(dtrsv,DTRSV)dtrsv_,(f2py_init_func)f2py_rout__fblas_dtrsv,doc_f2py_rout__fblas_dtrsv}, | |||
| 27066 | {"ctrsv",-1,{{-1}},0,(char *)F_FUNC(ctrsv,CTRSV)ctrsv_,(f2py_init_func)f2py_rout__fblas_ctrsv,doc_f2py_rout__fblas_ctrsv}, | |||
| 27067 | {"ztrsv",-1,{{-1}},0,(char *)F_FUNC(ztrsv,ZTRSV)ztrsv_,(f2py_init_func)f2py_rout__fblas_ztrsv,doc_f2py_rout__fblas_ztrsv}, | |||
| 27068 | {"stbmv",-1,{{-1}},0,(char *)F_FUNC(stbmv,STBMV)stbmv_,(f2py_init_func)f2py_rout__fblas_stbmv,doc_f2py_rout__fblas_stbmv}, | |||
| 27069 | {"dtbmv",-1,{{-1}},0,(char *)F_FUNC(dtbmv,DTBMV)dtbmv_,(f2py_init_func)f2py_rout__fblas_dtbmv,doc_f2py_rout__fblas_dtbmv}, | |||
| 27070 | {"ctbmv",-1,{{-1}},0,(char *)F_FUNC(ctbmv,CTBMV)ctbmv_,(f2py_init_func)f2py_rout__fblas_ctbmv,doc_f2py_rout__fblas_ctbmv}, | |||
| 27071 | {"ztbmv",-1,{{-1}},0,(char *)F_FUNC(ztbmv,ZTBMV)ztbmv_,(f2py_init_func)f2py_rout__fblas_ztbmv,doc_f2py_rout__fblas_ztbmv}, | |||
| 27072 | {"stpmv",-1,{{-1}},0,(char *)F_FUNC(stpmv,STPMV)stpmv_,(f2py_init_func)f2py_rout__fblas_stpmv,doc_f2py_rout__fblas_stpmv}, | |||
| 27073 | {"dtpmv",-1,{{-1}},0,(char *)F_FUNC(dtpmv,DTPMV)dtpmv_,(f2py_init_func)f2py_rout__fblas_dtpmv,doc_f2py_rout__fblas_dtpmv}, | |||
| 27074 | {"ctpmv",-1,{{-1}},0,(char *)F_FUNC(ctpmv,CTPMV)ctpmv_,(f2py_init_func)f2py_rout__fblas_ctpmv,doc_f2py_rout__fblas_ctpmv}, | |||
| 27075 | {"ztpmv",-1,{{-1}},0,(char *)F_FUNC(ztpmv,ZTPMV)ztpmv_,(f2py_init_func)f2py_rout__fblas_ztpmv,doc_f2py_rout__fblas_ztpmv}, | |||
| 27076 | {"sgemm",-1,{{-1}},0,(char *)F_FUNC(sgemm,SGEMM)sgemm_,(f2py_init_func)f2py_rout__fblas_sgemm,doc_f2py_rout__fblas_sgemm}, | |||
| 27077 | {"dgemm",-1,{{-1}},0,(char *)F_FUNC(dgemm,DGEMM)dgemm_,(f2py_init_func)f2py_rout__fblas_dgemm,doc_f2py_rout__fblas_dgemm}, | |||
| 27078 | {"cgemm",-1,{{-1}},0,(char *)F_FUNC(cgemm,CGEMM)cgemm_,(f2py_init_func)f2py_rout__fblas_cgemm,doc_f2py_rout__fblas_cgemm}, | |||
| 27079 | {"zgemm",-1,{{-1}},0,(char *)F_FUNC(zgemm,ZGEMM)zgemm_,(f2py_init_func)f2py_rout__fblas_zgemm,doc_f2py_rout__fblas_zgemm}, | |||
| 27080 | {"ssymm",-1,{{-1}},0,(char *)F_FUNC(ssymm,SSYMM)ssymm_,(f2py_init_func)f2py_rout__fblas_ssymm,doc_f2py_rout__fblas_ssymm}, | |||
| 27081 | {"dsymm",-1,{{-1}},0,(char *)F_FUNC(dsymm,DSYMM)dsymm_,(f2py_init_func)f2py_rout__fblas_dsymm,doc_f2py_rout__fblas_dsymm}, | |||
| 27082 | {"csymm",-1,{{-1}},0,(char *)F_FUNC(csymm,CSYMM)csymm_,(f2py_init_func)f2py_rout__fblas_csymm,doc_f2py_rout__fblas_csymm}, | |||
| 27083 | {"zsymm",-1,{{-1}},0,(char *)F_FUNC(zsymm,ZSYMM)zsymm_,(f2py_init_func)f2py_rout__fblas_zsymm,doc_f2py_rout__fblas_zsymm}, | |||
| 27084 | {"chemm",-1,{{-1}},0,(char *)F_FUNC(chemm,CHEMM)chemm_,(f2py_init_func)f2py_rout__fblas_chemm,doc_f2py_rout__fblas_chemm}, | |||
| 27085 | {"zhemm",-1,{{-1}},0,(char *)F_FUNC(zhemm,ZHEMM)zhemm_,(f2py_init_func)f2py_rout__fblas_zhemm,doc_f2py_rout__fblas_zhemm}, | |||
| 27086 | {"ssyrk",-1,{{-1}},0,(char *)F_FUNC(ssyrk,SSYRK)ssyrk_,(f2py_init_func)f2py_rout__fblas_ssyrk,doc_f2py_rout__fblas_ssyrk}, | |||
| 27087 | {"dsyrk",-1,{{-1}},0,(char *)F_FUNC(dsyrk,DSYRK)dsyrk_,(f2py_init_func)f2py_rout__fblas_dsyrk,doc_f2py_rout__fblas_dsyrk}, | |||
| 27088 | {"csyrk",-1,{{-1}},0,(char *)F_FUNC(csyrk,CSYRK)csyrk_,(f2py_init_func)f2py_rout__fblas_csyrk,doc_f2py_rout__fblas_csyrk}, | |||
| 27089 | {"zsyrk",-1,{{-1}},0,(char *)F_FUNC(zsyrk,ZSYRK)zsyrk_,(f2py_init_func)f2py_rout__fblas_zsyrk,doc_f2py_rout__fblas_zsyrk}, | |||
| 27090 | {"cherk",-1,{{-1}},0,(char *)F_FUNC(cherk,CHERK)cherk_,(f2py_init_func)f2py_rout__fblas_cherk,doc_f2py_rout__fblas_cherk}, | |||
| 27091 | {"zherk",-1,{{-1}},0,(char *)F_FUNC(zherk,ZHERK)zherk_,(f2py_init_func)f2py_rout__fblas_zherk,doc_f2py_rout__fblas_zherk}, | |||
| 27092 | {"ssyr2k",-1,{{-1}},0,(char *)F_FUNC(ssyr2k,SSYR2K)ssyr2k_,(f2py_init_func)f2py_rout__fblas_ssyr2k,doc_f2py_rout__fblas_ssyr2k}, | |||
| 27093 | {"dsyr2k",-1,{{-1}},0,(char *)F_FUNC(dsyr2k,DSYR2K)dsyr2k_,(f2py_init_func)f2py_rout__fblas_dsyr2k,doc_f2py_rout__fblas_dsyr2k}, | |||
| 27094 | {"csyr2k",-1,{{-1}},0,(char *)F_FUNC(csyr2k,CSYR2K)csyr2k_,(f2py_init_func)f2py_rout__fblas_csyr2k,doc_f2py_rout__fblas_csyr2k}, | |||
| 27095 | {"zsyr2k",-1,{{-1}},0,(char *)F_FUNC(zsyr2k,ZSYR2K)zsyr2k_,(f2py_init_func)f2py_rout__fblas_zsyr2k,doc_f2py_rout__fblas_zsyr2k}, | |||
| 27096 | {"cher2k",-1,{{-1}},0,(char *)F_FUNC(cher2k,CHER2K)cher2k_,(f2py_init_func)f2py_rout__fblas_cher2k,doc_f2py_rout__fblas_cher2k}, | |||
| 27097 | {"zher2k",-1,{{-1}},0,(char *)F_FUNC(zher2k,ZHER2K)zher2k_,(f2py_init_func)f2py_rout__fblas_zher2k,doc_f2py_rout__fblas_zher2k}, | |||
| 27098 | {"strmm",-1,{{-1}},0,(char *)F_FUNC(strmm,STRMM)strmm_,(f2py_init_func)f2py_rout__fblas_strmm,doc_f2py_rout__fblas_strmm}, | |||
| 27099 | {"dtrmm",-1,{{-1}},0,(char *)F_FUNC(dtrmm,DTRMM)dtrmm_,(f2py_init_func)f2py_rout__fblas_dtrmm,doc_f2py_rout__fblas_dtrmm}, | |||
| 27100 | {"ctrmm",-1,{{-1}},0,(char *)F_FUNC(ctrmm,CTRMM)ctrmm_,(f2py_init_func)f2py_rout__fblas_ctrmm,doc_f2py_rout__fblas_ctrmm}, | |||
| 27101 | {"ztrmm",-1,{{-1}},0,(char *)F_FUNC(ztrmm,ZTRMM)ztrmm_,(f2py_init_func)f2py_rout__fblas_ztrmm,doc_f2py_rout__fblas_ztrmm}, | |||
| 27102 | {"strsm",-1,{{-1}},0,(char *)F_FUNC(strsm,STRSM)strsm_,(f2py_init_func)f2py_rout__fblas_strsm,doc_f2py_rout__fblas_strsm}, | |||
| 27103 | {"dtrsm",-1,{{-1}},0,(char *)F_FUNC(dtrsm,DTRSM)dtrsm_,(f2py_init_func)f2py_rout__fblas_dtrsm,doc_f2py_rout__fblas_dtrsm}, | |||
| 27104 | {"ctrsm",-1,{{-1}},0,(char *)F_FUNC(ctrsm,CTRSM)ctrsm_,(f2py_init_func)f2py_rout__fblas_ctrsm,doc_f2py_rout__fblas_ctrsm}, | |||
| 27105 | {"ztrsm",-1,{{-1}},0,(char *)F_FUNC(ztrsm,ZTRSM)ztrsm_,(f2py_init_func)f2py_rout__fblas_ztrsm,doc_f2py_rout__fblas_ztrsm}, | |||
| 27106 | ||||
| 27107 | /*eof routine_defs*/ | |||
| 27108 | {NULL((void*)0)} | |||
| 27109 | }; | |||
| 27110 | ||||
| 27111 | static PyMethodDef f2py_module_methods[] = { | |||
| 27112 | ||||
| 27113 | {NULL((void*)0),NULL((void*)0)} | |||
| 27114 | }; | |||
| 27115 | ||||
| 27116 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27117 | static struct PyModuleDef moduledef = { | |||
| 27118 | PyModuleDef_HEAD_INIT{ { 1, ((void*)0) }, ((void*)0), 0, ((void*)0), }, | |||
| 27119 | "_fblas", | |||
| 27120 | NULL((void*)0), | |||
| 27121 | -1, | |||
| 27122 | f2py_module_methods, | |||
| 27123 | NULL((void*)0), | |||
| 27124 | NULL((void*)0), | |||
| 27125 | NULL((void*)0), | |||
| 27126 | NULL((void*)0) | |||
| 27127 | }; | |||
| 27128 | #endif | |||
| 27129 | ||||
| 27130 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27131 | #define RETVALm m | |||
| 27132 | PyMODINIT_FUNCPyObject* PyInit__fblas(void) { | |||
| 27133 | #else | |||
| 27134 | #define RETVALm | |||
| 27135 | PyMODINIT_FUNCPyObject* init_fblas(void) { | |||
| 27136 | #endif | |||
| 27137 | int i; | |||
| 27138 | PyObject *m,*d, *s, *tmp; | |||
| 27139 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27140 | m = _fblas_module = PyModule_Create(&moduledef)PyModule_Create2(&moduledef, 1013); | |||
| 27141 | #else | |||
| 27142 | m = _fblas_module = Py_InitModule("_fblas", f2py_module_methods); | |||
| 27143 | #endif | |||
| 27144 | Py_TYPE(&PyFortran_Type)(((PyObject*)(&PyFortran_Type))->ob_type) = &PyType_Type; | |||
| 27145 | import_array(){if (_import_array() < 0) {PyErr_Print(); PyErr_SetString( PyExc_ImportError, "numpy.core.multiarray failed to import"); return ((void*)0); } }; | |||
| ||||
| 27146 | if (PyErr_Occurred()) | |||
| 27147 | {PyErr_SetString(PyExc_ImportError, "can't initialize module _fblas (failed to import numpy)"); return RETVALm;} | |||
| 27148 | d = PyModule_GetDict(m); | |||
| 27149 | s = PyString_FromStringPyBytes_FromString("$Revision: $"); | |||
| 27150 | PyDict_SetItemString(d, "__version__", s); | |||
| 27151 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27152 | s = PyUnicode_FromString( | |||
| 27153 | #else | |||
| 27154 | s = PyString_FromStringPyBytes_FromString( | |||
| 27155 | #endif | |||
| 27156 | "This module '_fblas' is auto-generated with f2py (version:2).\nFunctions:\n" | |||
| 27157 | " c,s = srotg(a,b)\n" | |||
| 27158 | " c,s = drotg(a,b)\n" | |||
| 27159 | " c,s = crotg(a,b)\n" | |||
| 27160 | " c,s = zrotg(a,b)\n" | |||
| 27161 | " param = srotmg(d1,d2,x1,y1)\n" | |||
| 27162 | " param = drotmg(d1,d2,x1,y1)\n" | |||
| 27163 | " x,y = srot(x,y,c,s,n=(len(x)-1-offx)/abs(incx)+1,offx=0,incx=1,offy=0,incy=1,overwrite_x=0,overwrite_y=0)\n" | |||
| 27164 | " x,y = drot(x,y,c,s,n=(len(x)-1-offx)/abs(incx)+1,offx=0,incx=1,offy=0,incy=1,overwrite_x=0,overwrite_y=0)\n" | |||
| 27165 | " x,y = csrot(x,y,c,s,n=(len(x)-1-offx)/abs(incx)+1,offx=0,incx=1,offy=0,incy=1,overwrite_x=0,overwrite_y=0)\n" | |||
| 27166 | " x,y = zdrot(x,y,c,s,n=(len(x)-1-offx)/abs(incx)+1,offx=0,incx=1,offy=0,incy=1,overwrite_x=0,overwrite_y=0)\n" | |||
| 27167 | " x,y = srotm(x,y,param,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1,overwrite_x=0,overwrite_y=0)\n" | |||
| 27168 | " x,y = drotm(x,y,param,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1,overwrite_x=0,overwrite_y=0)\n" | |||
| 27169 | " x,y = sswap(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27170 | " x,y = dswap(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27171 | " x,y = cswap(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27172 | " x,y = zswap(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27173 | " x = sscal(a,x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27174 | " x = dscal(a,x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27175 | " x = cscal(a,x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27176 | " x = zscal(a,x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27177 | " x = csscal(a,x,n=(len(x)-offx)/abs(incx),offx=0,incx=1,overwrite_x=0)\n" | |||
| 27178 | " x = zdscal(a,x,n=(len(x)-offx)/abs(incx),offx=0,incx=1,overwrite_x=0)\n" | |||
| 27179 | " y = scopy(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27180 | " y = dcopy(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27181 | " y = ccopy(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27182 | " y = zcopy(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27183 | " z = saxpy(x,y,n=(len(x)-offx)/abs(incx),a=1.0,offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27184 | " z = daxpy(x,y,n=(len(x)-offx)/abs(incx),a=1.0,offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27185 | " z = caxpy(x,y,n=(len(x)-offx)/abs(incx),a=(1.0, 0.0),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27186 | " z = zaxpy(x,y,n=(len(x)-offx)/abs(incx),a=(1.0, 0.0),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27187 | " xy = sdot(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27188 | " xy = ddot(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27189 | " xy = cdotu(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27190 | " xy = zdotu(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27191 | " xy = cdotc(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27192 | " xy = zdotc(x,y,n=(len(x)-offx)/abs(incx),offx=0,incx=1,offy=0,incy=1)\n" | |||
| 27193 | " n2 = snrm2(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27194 | " n2 = scnrm2(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27195 | " n2 = dnrm2(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27196 | " n2 = dznrm2(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27197 | " s = sasum(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27198 | " s = scasum(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27199 | " s = dasum(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27200 | " s = dzasum(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27201 | " k = isamax(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27202 | " k = idamax(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27203 | " k = icamax(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27204 | " k = izamax(x,n=(len(x)-offx)/abs(incx),offx=0,incx=1)\n" | |||
| 27205 | " y = sgemv(alpha,a,x,beta=0.0,y=,offx=0,incx=1,offy=0,incy=1,trans=0,overwrite_y=0)\n" | |||
| 27206 | " y = dgemv(alpha,a,x,beta=0.0,y=,offx=0,incx=1,offy=0,incy=1,trans=0,overwrite_y=0)\n" | |||
| 27207 | " y = cgemv(alpha,a,x,beta=(0.0, 0.0),y=,offx=0,incx=1,offy=0,incy=1,trans=0,overwrite_y=0)\n" | |||
| 27208 | " y = zgemv(alpha,a,x,beta=(0.0, 0.0),y=,offx=0,incx=1,offy=0,incy=1,trans=0,overwrite_y=0)\n" | |||
| 27209 | " yout = sgbmv(m,n,kl,ku,alpha,a,x,incx=1,offx=0,beta=0.0,y=,incy=1,offy=0,trans=0,overwrite_y=0)\n" | |||
| 27210 | " yout = dgbmv(m,n,kl,ku,alpha,a,x,incx=1,offx=0,beta=0.0,y=,incy=1,offy=0,trans=0,overwrite_y=0)\n" | |||
| 27211 | " yout = cgbmv(m,n,kl,ku,alpha,a,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,trans=0,overwrite_y=0)\n" | |||
| 27212 | " yout = zgbmv(m,n,kl,ku,alpha,a,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,trans=0,overwrite_y=0)\n" | |||
| 27213 | " yout = ssbmv(k,alpha,a,x,incx=1,offx=0,beta=0.0,y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27214 | " yout = dsbmv(k,alpha,a,x,incx=1,offx=0,beta=0.0,y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27215 | " yout = chbmv(k,alpha,a,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27216 | " yout = zhbmv(k,alpha,a,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27217 | " yout = sspmv(n,alpha,ap,x,incx=1,offx=0,beta=0.0,y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27218 | " yout = dspmv(n,alpha,ap,x,incx=1,offx=0,beta=0.0,y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27219 | " yout = cspmv(n,alpha,ap,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27220 | " yout = zspmv(n,alpha,ap,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27221 | " yout = chpmv(n,alpha,ap,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27222 | " yout = zhpmv(n,alpha,ap,x,incx=1,offx=0,beta=(0.0, 0.0),y=,incy=1,offy=0,lower=0,overwrite_y=0)\n" | |||
| 27223 | " y = ssymv(alpha,a,x,beta=0.0,y=,offx=0,incx=1,offy=0,incy=1,lower=0,overwrite_y=0)\n" | |||
| 27224 | " y = dsymv(alpha,a,x,beta=0.0,y=,offx=0,incx=1,offy=0,incy=1,lower=0,overwrite_y=0)\n" | |||
| 27225 | " y = chemv(alpha,a,x,beta=(0.0, 0.0),y=,offx=0,incx=1,offy=0,incy=1,lower=0,overwrite_y=0)\n" | |||
| 27226 | " y = zhemv(alpha,a,x,beta=(0.0, 0.0),y=,offx=0,incx=1,offy=0,incy=1,lower=0,overwrite_y=0)\n" | |||
| 27227 | " a = sger(alpha,x,y,incx=1,incy=1,a=0.0,overwrite_x=1,overwrite_y=1,overwrite_a=0)\n" | |||
| 27228 | " a = dger(alpha,x,y,incx=1,incy=1,a=0.0,overwrite_x=1,overwrite_y=1,overwrite_a=0)\n" | |||
| 27229 | " a = cgeru(alpha,x,y,incx=1,incy=1,a=(0.0,0.0),overwrite_x=1,overwrite_y=1,overwrite_a=0)\n" | |||
| 27230 | " a = zgeru(alpha,x,y,incx=1,incy=1,a=(0.0,0.0),overwrite_x=1,overwrite_y=1,overwrite_a=0)\n" | |||
| 27231 | " a = cgerc(alpha,x,y,incx=1,incy=1,a=(0.0,0.0),overwrite_x=1,overwrite_y=1,overwrite_a=0)\n" | |||
| 27232 | " a = zgerc(alpha,x,y,incx=1,incy=1,a=(0.0,0.0),overwrite_x=1,overwrite_y=1,overwrite_a=0)\n" | |||
| 27233 | " a = ssyr(alpha,x,lower=0,incx=1,offx=0,n=(len(x)-1-offx)/abs(incx)+1,a=,overwrite_a=0)\n" | |||
| 27234 | " a = dsyr(alpha,x,lower=0,incx=1,offx=0,n=(len(x)-1-offx)/abs(incx)+1,a=,overwrite_a=0)\n" | |||
| 27235 | " a = csyr(alpha,x,lower=0,incx=1,offx=0,n=(len(x)-1-offx)/abs(incx)+1,a=,overwrite_a=0)\n" | |||
| 27236 | " a = zsyr(alpha,x,lower=0,incx=1,offx=0,n=(len(x)-1-offx)/abs(incx)+1,a=,overwrite_a=0)\n" | |||
| 27237 | " a = cher(alpha,x,lower=0,incx=1,offx=0,n=(len(x)-1-offx)/abs(incx)+1,a=,overwrite_a=0)\n" | |||
| 27238 | " a = zher(alpha,x,lower=0,incx=1,offx=0,n=(len(x)-1-offx)/abs(incx)+1,a=,overwrite_a=0)\n" | |||
| 27239 | " a = ssyr2(alpha,x,y,lower=0,incx=1,offx=0,incy=1,offy=0,n=((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1),a=,overwrite_a=0)\n" | |||
| 27240 | " a = dsyr2(alpha,x,y,lower=0,incx=1,offx=0,incy=1,offy=0,n=((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1),a=,overwrite_a=0)\n" | |||
| 27241 | " a = cher2(alpha,x,y,lower=0,incx=1,offx=0,incy=1,offy=0,n=((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1),a=,overwrite_a=0)\n" | |||
| 27242 | " a = zher2(alpha,x,y,lower=0,incx=1,offx=0,incy=1,offy=0,n=((len(x)-1-offx)/abs(incx)+1 <=(len(y)-1-offy)/abs(incy)+1 ?(len(x)-1-offx)/abs(incx)+1 :(len(y)-1-offy)/abs(incy)+1),a=,overwrite_a=0)\n" | |||
| 27243 | " apu = sspr(n,alpha,x,ap,incx=1,offx=0,lower=0,overwrite_ap=0)\n" | |||
| 27244 | " apu = dspr(n,alpha,x,ap,incx=1,offx=0,lower=0,overwrite_ap=0)\n" | |||
| 27245 | " apu = cspr(n,alpha,x,ap,incx=1,offx=0,lower=0,overwrite_ap=0)\n" | |||
| 27246 | " apu = zspr(n,alpha,x,ap,incx=1,offx=0,lower=0,overwrite_ap=0)\n" | |||
| 27247 | " apu = chpr(n,alpha,x,ap,incx=1,offx=0,lower=0,overwrite_ap=0)\n" | |||
| 27248 | " apu = zhpr(n,alpha,x,ap,incx=1,offx=0,lower=0,overwrite_ap=0)\n" | |||
| 27249 | " apu = sspr2(n,alpha,x,y,ap,incx=1,offx=0,incy=1,offy=0,lower=0,overwrite_ap=0)\n" | |||
| 27250 | " apu = dspr2(n,alpha,x,y,ap,incx=1,offx=0,incy=1,offy=0,lower=0,overwrite_ap=0)\n" | |||
| 27251 | " apu = chpr2(n,alpha,x,y,ap,incx=1,offx=0,incy=1,offy=0,lower=0,overwrite_ap=0)\n" | |||
| 27252 | " apu = zhpr2(n,alpha,x,y,ap,incx=1,offx=0,incy=1,offy=0,lower=0,overwrite_ap=0)\n" | |||
| 27253 | " xout = stbsv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27254 | " xout = dtbsv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27255 | " xout = ctbsv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27256 | " xout = ztbsv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27257 | " xout = stpsv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27258 | " xout = dtpsv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27259 | " xout = ctpsv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27260 | " xout = ztpsv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27261 | " x = strmv(a,x,offx=0,incx=1,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27262 | " x = dtrmv(a,x,offx=0,incx=1,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27263 | " x = ctrmv(a,x,offx=0,incx=1,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27264 | " x = ztrmv(a,x,offx=0,incx=1,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27265 | " xout = strsv(a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27266 | " xout = dtrsv(a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27267 | " xout = ctrsv(a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27268 | " xout = ztrsv(a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27269 | " xout = stbmv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27270 | " xout = dtbmv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27271 | " xout = ctbmv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27272 | " xout = ztbmv(k,a,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27273 | " xout = stpmv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27274 | " xout = dtpmv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27275 | " xout = ctpmv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27276 | " xout = ztpmv(n,ap,x,incx=1,offx=0,lower=0,trans=0,diag=0,overwrite_x=0)\n" | |||
| 27277 | " c = sgemm(alpha,a,b,beta=0.0,c=,trans_a=0,trans_b=0,overwrite_c=0)\n" | |||
| 27278 | " c = dgemm(alpha,a,b,beta=0.0,c=,trans_a=0,trans_b=0,overwrite_c=0)\n" | |||
| 27279 | " c = cgemm(alpha,a,b,beta=(0.0, 0.0),c=,trans_a=0,trans_b=0,overwrite_c=0)\n" | |||
| 27280 | " c = zgemm(alpha,a,b,beta=(0.0, 0.0),c=,trans_a=0,trans_b=0,overwrite_c=0)\n" | |||
| 27281 | " c = ssymm(alpha,a,b,beta=0.0,c=,side=0,lower=0,overwrite_c=0)\n" | |||
| 27282 | " c = dsymm(alpha,a,b,beta=0.0,c=,side=0,lower=0,overwrite_c=0)\n" | |||
| 27283 | " c = csymm(alpha,a,b,beta=(0.0, 0.0),c=,side=0,lower=0,overwrite_c=0)\n" | |||
| 27284 | " c = zsymm(alpha,a,b,beta=(0.0, 0.0),c=,side=0,lower=0,overwrite_c=0)\n" | |||
| 27285 | " c = chemm(alpha,a,b,beta=(0.0, 0.0),c=,side=0,lower=0,overwrite_c=0)\n" | |||
| 27286 | " c = zhemm(alpha,a,b,beta=(0.0, 0.0),c=,side=0,lower=0,overwrite_c=0)\n" | |||
| 27287 | " c = ssyrk(alpha,a,beta=0.0,c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27288 | " c = dsyrk(alpha,a,beta=0.0,c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27289 | " c = csyrk(alpha,a,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27290 | " c = zsyrk(alpha,a,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27291 | " c = cherk(alpha,a,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27292 | " c = zherk(alpha,a,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27293 | " c = ssyr2k(alpha,a,b,beta=0.0,c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27294 | " c = dsyr2k(alpha,a,b,beta=0.0,c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27295 | " c = csyr2k(alpha,a,b,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27296 | " c = zsyr2k(alpha,a,b,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27297 | " c = cher2k(alpha,a,b,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27298 | " c = zher2k(alpha,a,b,beta=(0.0, 0.0),c=,trans=0,lower=0,overwrite_c=0)\n" | |||
| 27299 | " b = strmm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27300 | " b = dtrmm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27301 | " b = ctrmm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27302 | " b = ztrmm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27303 | " x = strsm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27304 | " x = dtrsm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27305 | " x = ctrsm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27306 | " x = ztrsm(alpha,a,b,side=0,lower=0,trans_a=0,diag=0,overwrite_b=0)\n" | |||
| 27307 | "."); | |||
| 27308 | PyDict_SetItemString(d, "__doc__", s); | |||
| 27309 | _fblas_error = PyErr_NewException ("_fblas.error", NULL((void*)0), NULL((void*)0)); | |||
| 27310 | Py_DECREF(s)_Py_DECREF(((PyObject*)(s))); | |||
| 27311 | for(i=0;f2py_routine_defs[i].name!=NULL((void*)0);i++) { | |||
| 27312 | tmp = PyFortranObject_NewAsAttr(&f2py_routine_defs[i]); | |||
| 27313 | PyDict_SetItemString(d, f2py_routine_defs[i].name, tmp); | |||
| 27314 | Py_DECREF(tmp)_Py_DECREF(((PyObject*)(tmp))); | |||
| 27315 | } | |||
| 27316 | ||||
| 27317 | ||||
| 27318 | ||||
| 27319 | ||||
| 27320 | ||||
| 27321 | ||||
| 27322 | ||||
| 27323 | ||||
| 27324 | ||||
| 27325 | ||||
| 27326 | ||||
| 27327 | ||||
| 27328 | ||||
| 27329 | ||||
| 27330 | ||||
| 27331 | ||||
| 27332 | ||||
| 27333 | ||||
| 27334 | ||||
| 27335 | ||||
| 27336 | ||||
| 27337 | ||||
| 27338 | ||||
| 27339 | ||||
| 27340 | ||||
| 27341 | ||||
| 27342 | ||||
| 27343 | ||||
| 27344 | ||||
| 27345 | ||||
| 27346 | ||||
| 27347 | { | |||
| 27348 | extern float F_FUNC(sdot,SDOT)sdot_(void); | |||
| 27349 | PyObject* o = PyDict_GetItemString(d,"sdot"); | |||
| 27350 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(sdot,SDOT)sdot_,NULL((void*)0))); | |||
| 27351 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27352 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("sdot")); | |||
| 27353 | #else | |||
| 27354 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("sdot")); | |||
| 27355 | #endif | |||
| 27356 | } | |||
| 27357 | ||||
| 27358 | ||||
| 27359 | { | |||
| 27360 | extern double F_FUNC(ddot,DDOT)ddot_(void); | |||
| 27361 | PyObject* o = PyDict_GetItemString(d,"ddot"); | |||
| 27362 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(ddot,DDOT)ddot_,NULL((void*)0))); | |||
| 27363 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27364 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("ddot")); | |||
| 27365 | #else | |||
| 27366 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("ddot")); | |||
| 27367 | #endif | |||
| 27368 | } | |||
| 27369 | ||||
| 27370 | ||||
| 27371 | { | |||
| 27372 | extern complex_float F_FUNC(cdotu,CDOTU)cdotu_(void); | |||
| 27373 | PyObject* o = PyDict_GetItemString(d,"cdotu"); | |||
| 27374 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(cdotu,CDOTU)cdotu_,NULL((void*)0))); | |||
| 27375 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27376 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("cdotu")); | |||
| 27377 | #else | |||
| 27378 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("cdotu")); | |||
| 27379 | #endif | |||
| 27380 | } | |||
| 27381 | ||||
| 27382 | ||||
| 27383 | { | |||
| 27384 | extern complex_double F_FUNC(zdotu,ZDOTU)zdotu_(void); | |||
| 27385 | PyObject* o = PyDict_GetItemString(d,"zdotu"); | |||
| 27386 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(zdotu,ZDOTU)zdotu_,NULL((void*)0))); | |||
| 27387 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27388 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("zdotu")); | |||
| 27389 | #else | |||
| 27390 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("zdotu")); | |||
| 27391 | #endif | |||
| 27392 | } | |||
| 27393 | ||||
| 27394 | ||||
| 27395 | { | |||
| 27396 | extern complex_float F_FUNC(cdotc,CDOTC)cdotc_(void); | |||
| 27397 | PyObject* o = PyDict_GetItemString(d,"cdotc"); | |||
| 27398 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(cdotc,CDOTC)cdotc_,NULL((void*)0))); | |||
| 27399 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27400 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("cdotc")); | |||
| 27401 | #else | |||
| 27402 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("cdotc")); | |||
| 27403 | #endif | |||
| 27404 | } | |||
| 27405 | ||||
| 27406 | ||||
| 27407 | { | |||
| 27408 | extern complex_double F_FUNC(zdotc,ZDOTC)zdotc_(void); | |||
| 27409 | PyObject* o = PyDict_GetItemString(d,"zdotc"); | |||
| 27410 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(zdotc,ZDOTC)zdotc_,NULL((void*)0))); | |||
| 27411 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27412 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("zdotc")); | |||
| 27413 | #else | |||
| 27414 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("zdotc")); | |||
| 27415 | #endif | |||
| 27416 | } | |||
| 27417 | ||||
| 27418 | ||||
| 27419 | { | |||
| 27420 | extern float F_FUNC(snrm2,SNRM2)snrm2_(void); | |||
| 27421 | PyObject* o = PyDict_GetItemString(d,"snrm2"); | |||
| 27422 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(snrm2,SNRM2)snrm2_,NULL((void*)0))); | |||
| 27423 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27424 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("snrm2")); | |||
| 27425 | #else | |||
| 27426 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("snrm2")); | |||
| 27427 | #endif | |||
| 27428 | } | |||
| 27429 | ||||
| 27430 | ||||
| 27431 | { | |||
| 27432 | extern float F_FUNC(scnrm2,SCNRM2)scnrm2_(void); | |||
| 27433 | PyObject* o = PyDict_GetItemString(d,"scnrm2"); | |||
| 27434 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(scnrm2,SCNRM2)scnrm2_,NULL((void*)0))); | |||
| 27435 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27436 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("scnrm2")); | |||
| 27437 | #else | |||
| 27438 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("scnrm2")); | |||
| 27439 | #endif | |||
| 27440 | } | |||
| 27441 | ||||
| 27442 | ||||
| 27443 | { | |||
| 27444 | extern double F_FUNC(dnrm2,DNRM2)dnrm2_(void); | |||
| 27445 | PyObject* o = PyDict_GetItemString(d,"dnrm2"); | |||
| 27446 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(dnrm2,DNRM2)dnrm2_,NULL((void*)0))); | |||
| 27447 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27448 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("dnrm2")); | |||
| 27449 | #else | |||
| 27450 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("dnrm2")); | |||
| 27451 | #endif | |||
| 27452 | } | |||
| 27453 | ||||
| 27454 | ||||
| 27455 | { | |||
| 27456 | extern double F_FUNC(dznrm2,DZNRM2)dznrm2_(void); | |||
| 27457 | PyObject* o = PyDict_GetItemString(d,"dznrm2"); | |||
| 27458 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(dznrm2,DZNRM2)dznrm2_,NULL((void*)0))); | |||
| 27459 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27460 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("dznrm2")); | |||
| ||||
| 27461 | #else | |||
| 27462 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("dznrm2")); | |||
| 27463 | #endif | |||
| 27464 | } | |||
| 27465 | ||||
| 27466 | ||||
| 27467 | { | |||
| 27468 | extern float F_FUNC(sasum,SASUM)sasum_(void); | |||
| 27469 | PyObject* o = PyDict_GetItemString(d,"sasum"); | |||
| 27470 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(sasum,SASUM)sasum_,NULL((void*)0))); | |||
| 27471 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27472 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("sasum")); | |||
| 27473 | #else | |||
| 27474 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("sasum")); | |||
| 27475 | #endif | |||
| 27476 | } | |||
| 27477 | ||||
| 27478 | ||||
| 27479 | { | |||
| 27480 | extern float F_FUNC(scasum,SCASUM)scasum_(void); | |||
| 27481 | PyObject* o = PyDict_GetItemString(d,"scasum"); | |||
| 27482 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(scasum,SCASUM)scasum_,NULL((void*)0))); | |||
| 27483 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27484 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("scasum")); | |||
| 27485 | #else | |||
| 27486 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("scasum")); | |||
| 27487 | #endif | |||
| 27488 | } | |||
| 27489 | ||||
| 27490 | ||||
| 27491 | { | |||
| 27492 | extern double F_FUNC(dasum,DASUM)dasum_(void); | |||
| 27493 | PyObject* o = PyDict_GetItemString(d,"dasum"); | |||
| 27494 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(dasum,DASUM)dasum_,NULL((void*)0))); | |||
| 27495 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27496 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("dasum")); | |||
| 27497 | #else | |||
| 27498 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("dasum")); | |||
| 27499 | #endif | |||
| 27500 | } | |||
| 27501 | ||||
| 27502 | ||||
| 27503 | { | |||
| 27504 | extern double F_FUNC(dzasum,DZASUM)dzasum_(void); | |||
| 27505 | PyObject* o = PyDict_GetItemString(d,"dzasum"); | |||
| 27506 | PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)F_FUNC(dzasum,DZASUM)dzasum_,NULL((void*)0))); | |||
| 27507 | #if PY_VERSION_HEX((3 << 24) | (8 << 16) | (5 << 8) | (0xF << 4) | (0 << 0)) >= 0x03000000 | |||
| 27508 | PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("dzasum")); | |||
| 27509 | #else | |||
| 27510 | PyObject_SetAttrString(o,"__name__", PyString_FromStringPyBytes_FromString("dzasum")); | |||
| 27511 | #endif | |||
| 27512 | } | |||
| 27513 | ||||
| 27514 | ||||
| 27515 | ||||
| 27516 | ||||
| 27517 | ||||
| 27518 | ||||
| 27519 | ||||
| 27520 | ||||
| 27521 | ||||
| 27522 | ||||
| 27523 | ||||
| 27524 | ||||
| 27525 | ||||
| 27526 | ||||
| 27527 | ||||
| 27528 | ||||
| 27529 | ||||
| 27530 | ||||
| 27531 | ||||
| 27532 | ||||
| 27533 | ||||
| 27534 | ||||
| 27535 | ||||
| 27536 | ||||
| 27537 | ||||
| 27538 | ||||
| 27539 | ||||
| 27540 | ||||
| 27541 | ||||
| 27542 | ||||
| 27543 | ||||
| 27544 | ||||
| 27545 | ||||
| 27546 | ||||
| 27547 | ||||
| 27548 | ||||
| 27549 | ||||
| 27550 | ||||
| 27551 | ||||
| 27552 | ||||
| 27553 | ||||
| 27554 | ||||
| 27555 | ||||
| 27556 | ||||
| 27557 | ||||
| 27558 | ||||
| 27559 | ||||
| 27560 | ||||
| 27561 | ||||
| 27562 | ||||
| 27563 | ||||
| 27564 | ||||
| 27565 | ||||
| 27566 | ||||
| 27567 | ||||
| 27568 | ||||
| 27569 | ||||
| 27570 | ||||
| 27571 | ||||
| 27572 | ||||
| 27573 | ||||
| 27574 | ||||
| 27575 | ||||
| 27576 | ||||
| 27577 | ||||
| 27578 | ||||
| 27579 | ||||
| 27580 | ||||
| 27581 | ||||
| 27582 | ||||
| 27583 | ||||
| 27584 | ||||
| 27585 | ||||
| 27586 | ||||
| 27587 | ||||
| 27588 | ||||
| 27589 | ||||
| 27590 | ||||
| 27591 | ||||
| 27592 | ||||
| 27593 | ||||
| 27594 | ||||
| 27595 | ||||
| 27596 | ||||
| 27597 | ||||
| 27598 | ||||
| 27599 | ||||
| 27600 | ||||
| 27601 | ||||
| 27602 | ||||
| 27603 | ||||
| 27604 | ||||
| 27605 | ||||
| 27606 | ||||
| 27607 | ||||
| 27608 | ||||
| 27609 | ||||
| 27610 | ||||
| 27611 | ||||
| 27612 | ||||
| 27613 | ||||
| 27614 | ||||
| 27615 | ||||
| 27616 | ||||
| 27617 | ||||
| 27618 | ||||
| 27619 | ||||
| 27620 | /*eof initf2pywraphooks*/ | |||
| 27621 | /*eof initf90modhooks*/ | |||
| 27622 | ||||
| 27623 | /*eof initcommonhooks*/ | |||
| 27624 | ||||
| 27625 | ||||
| 27626 | #ifdef F2PY_REPORT_ATEXIT | |||
| 27627 | if (! PyErr_Occurred()) | |||
| 27628 | on_exit(f2py_report_on_exit,(void*)"_fblas"); | |||
| 27629 | #endif | |||
| 27630 | ||||
| 27631 | return RETVALm; | |||
| 27632 | } | |||
| 27633 | #ifdef __cplusplus | |||
| 27634 | } | |||
| 27635 | #endif |
| 1 | #ifndef PyUnicode_FromString |
| 2 | struct _object; |
| 3 | typedef struct _object PyObject; |
| 4 | PyObject* clang_analyzer_PyObject_New_Reference(); |
| 5 | PyObject *PyUnicode_FromString(const char *u) { |
| 6 | return clang_analyzer_PyObject_New_Reference(); |
| 7 | } |
| 8 | #else |
| 9 | #warning "API PyUnicode_FromString is defined as a macro." |
| 10 | #endif |